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.2.tar.gz
(2.7 kB
view hashes)
Built Distribution
Close
Hashes for storeweights-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 625b20f6877eff0f59a490598f4fa8f294fac6646af13010285a12b438b30d58 |
|
MD5 | 9840706b4e30bc4f41a67d635fffbd9b |
|
BLAKE2b-256 | 408efaa8614ff2e3b415589f758b344164c181c3de17c7e3466e60a0f7a100cb |