Storing PyTorch checkpoints in efficient way
Project description
storeweights
Storing PyTorch checkpoints in efficient way.
Install
pip install storeweights
Running
from storeweights import weights
##PyTorch code ....
model = TheModelClass()
optimizer = optim.SGD(model.parameters(), lr=0.001, momentum=0.9)
....
Saving model (local)
weights.save('model_name',model,optimizer,extra_info={'epoch':40})
Loading model (local)
weights.load('model_name',model,optimizer,return_extra_info=True)
Saving model (gdrive colab)
weights.save('model_name',model,optimizer,extra_info={'epoch':40},gdrive=True)
Loading model (gdrive colab)
weights.load('model_name',model,optimizer,return_extra_info=True,gdrive=True)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
storeweights-1.0.0.tar.gz
(2.4 kB
view hashes)
Built Distribution
Close
Hashes for storeweights-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9e15ba8f588f759c4fc3a4694d260026f3918a4d05cdf3f3299734c15f1d06a |
|
MD5 | 70c0ea756519a2a4a4d7a5fa91d6a17b |
|
BLAKE2b-256 | bf9e92fff99b8968ef36ab11455d55a7e903d3fe3c1a6ecd29da1145fc840fa4 |