Simple standard for model checkpointing, framework-agnostic
Project description
Checkptr
Simple, framework-agnostic standard for model checkpointing
pip install checkptr
from checkptr import Checkpointer
chkptr = Checkpointer.pytorch('path/to/checkpoints')
# or Checkpointer('path', save_fn=torch.save, load_fn=torch.load)
chkptr.checkpoint(model, f'model_{epoch}.pth')
model = checkptr.load(f'model_{epoch}.pth')
print('Checkpoints:', chkptr.checkpoints()) # ['model_0.pth', 'model_1.pth', ...]
Creates:
checkpoints/
model_0.pth
model_1.pth
...
And that's it! Simple.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
checkptr-0.1.1.tar.gz
(2.0 kB
view hashes)