You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
286 B
14 lines
286 B
1 year ago
|
import pickle
|
||
|
|
||
|
load = pickle.load
|
||
|
|
||
|
class Empty:
|
||
|
pass
|
||
|
|
||
|
class Unpickler(pickle.Unpickler):
|
||
|
def find_class(self, module, name):
|
||
|
#TODO: safe unpickle
|
||
|
if module.startswith("pytorch_lightning"):
|
||
|
return Empty
|
||
|
return super().find_class(module, name)
|