(cls, path)
| 222 | |
| 223 | @classmethod |
| 224 | def load(cls, path): |
| 225 | with open(path, "rb") as f: |
| 226 | checkpoint = pickle.load(f) |
| 227 | assert isinstance(checkpoint, cls) |
| 228 | |
| 229 | return checkpoint |
| 230 | |
| 231 | def _verify(self): |
| 232 | """Check that the checkpoint has no duplicates and is consistent.""" |
no outgoing calls