Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

checkpoint_pickle.py 286 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
  1. import pickle
  2. load = pickle.load
  3. class Empty:
  4. pass
  5. class Unpickler(pickle.Unpickler):
  6. def find_class(self, module, name):
  7. #TODO: safe unpickle
  8. if module.startswith("pytorch_lightning"):
  9. return Empty
  10. return super().find_class(module, name)
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...