Skip to main content

Simple standard for model checkpointing, framework-agnostic

Project description

Checkptr

Simple, framework-agnostic standard for model checkpointing

pip install checkptr
from checkptr import Checkpointer

chkptr = Checkpointer.pytorch('path/to/checkpoints')
# or Checkpointer('path', save_fn=torch.save, load_fn=torch.load)

chkptr.checkpoint(model, f'model_{epoch}.pth')
model = checkptr.load(f'model_{epoch}.pth')


print('Checkpoints:', chkptr.checkpoints()) # ['model_0.pth', 'model_1.pth', ...]

Creates:

checkpoints/
  model_0.pth
  model_1.pth
  ...

And that's it! Simple.

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

checkptr-0.1.3.tar.gz (2.1 kB view hashes)

Uploaded Source

Built Distribution

checkptr-0.1.3-py3-none-any.whl (2.4 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