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.1.tar.gz
(2.3 kB
view hashes)
Built Distribution
Close
Hashes for storeweights-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43369e1f3e9c5db8d824d3cf66b8f044d0e139b4560923eaf8c5b4684084d798 |
|
MD5 | 1f6c7f4de611c47b44ea29bf40af407f |
|
BLAKE2b-256 | 82e7f3319c04de193f60a350321ed2abecdee6e886c43bdc4b68ea12b1fd8bc4 |