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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file storeweights-1.0.2.tar.gz.

File metadata

  • Download URL: storeweights-1.0.2.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for storeweights-1.0.2.tar.gz
Algorithm Hash digest
SHA256 5092ecdb885090cd332708cf539a6503a930be0fd0555e9c22511856209cf976
MD5 9621787ca36e0908ef2733406fe7108a
BLAKE2b-256 796a98dc6d6a8d59c54ea1eb30ab9307e4d434c355475616894a4ffb0558ac48

See more details on using hashes here.

File details

Details for the file storeweights-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: storeweights-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for storeweights-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 625b20f6877eff0f59a490598f4fa8f294fac6646af13010285a12b438b30d58
MD5 9840706b4e30bc4f41a67d635fffbd9b
BLAKE2b-256 408efaa8614ff2e3b415589f758b344164c181c3de17c7e3466e60a0f7a100cb

See more details on using hashes here.

Supported by

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