Skip to main content

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


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)

Uploaded Source

Built Distribution

storeweights-1.0.2-py3-none-any.whl (4.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page