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.3.tar.gz
(2.1 kB
view details)
Built Distribution
File details
Details for the file checkptr-0.1.3.tar.gz
.
File metadata
- Download URL: checkptr-0.1.3.tar.gz
- Upload date:
- Size: 2.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6a7c316b393086969fcb9ea9c2c1be640415ae7d75869e1d78428346bc386ee |
|
MD5 | 4da81ba57af427bfda52b2d40aa53e3b |
|
BLAKE2b-256 | 33fe9bf5a75ccd04db2bf7ac1b1e019655bc624ae3759bc1c5af2feaffd3a665 |
File details
Details for the file checkptr-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: checkptr-0.1.3-py3-none-any.whl
- Upload date:
- Size: 2.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c313c457eb9b6dd475ea994e63dd53376a792fffb0e70d148d2dc2a6ac4193ed |
|
MD5 | 0514300805a82af1eb101b89f18412f5 |
|
BLAKE2b-256 | 95c94e2a4f7fd827c08ab29918ddcc379e6c49d09813d92949f67ba2ef3dde39 |