Skip to main content

Metaflow Checkpoint

Imagine running a machine learning training job or any data processing task that takes hours or even days to complete. In such scenarios, you don't want failures or collaboration complexities to force you to start over and lose all the progress made. This is where Metaflow's new decorators—@checkpoint, @model, and @huggingface_hub—come into play. These decorators are specifically designed to address these challenges by simplifying checkpointing, model management, and efficient loading of external models, ensuring that your long-running jobs can be resumed seamlessly after a failure and that models and checkpoints are properly versioned in multi-user environments.

This repository introduces three new decorators for Metaflow that address these challenges:

  • @checkpoint: Simplifies saving and reloading checkpoints within your Metaflow flows.
  • @huggingface_hub: Enables efficient loading and caching of large models from Hugging Face Hub.
  • @model: Allows for easy saving and loading of models created during your Metaflow flows.

Examples for these decorators can be found in this repository.

Features

@checkpoint Decorator

The @checkpoint decorator alleviates the pain points associated with saving and reloading the state of your program (a Metaflow @step) in Metaflow flows. It also handles version control in multi-user settings by isolating checkpoints per user and run. Whether it's a checkpoint created by a machine learning model or intermediate data required in case of crashes, this decorator simplifies state management and failure recovery.

  • Checkpointing: Save the state of your @step at designated points.
  • Seamless Recovery: Restart your job from the last checkpoint upon retries without any manual intervention.
  • User Isolation: Checkpoints are managed per user to prevent overwriting in collaborative environments.
  • Ease of Use: Minimal code changes required to implement checkpointing.

@huggingface_hub Decorator

The @huggingface_hub decorator allows you to load large models from Hugging Face Hub and cache them for increased performance benefits. It also ensures that models are versioned and managed appropriately in multi-user environments.

  • Efficient Model Loading: Load models on-the-fly from Hugging Face Hub.
  • Caching Mechanism: Cache models locally to avoid redundant downloads.
  • Version Control: Manages different versions of models to prevent conflicts.
  • Integration with Metaflow: Easily incorporate models across your Metaflow flows.

@model Decorator

The @model decorator provides a trivial way to save and load models/checkpoints created as part of your Metaflow flow.

  • Simplified Model Loading: Automatically load models based on references and identifiers created by decorators such as @model/@checkpoint/@huggingface_hub.
  • Model Identity: Associates a uniquie identity to models so that there is clear distinction between different versions making it easy to track their lineage.

Metadata

Release files for metaflow-checkpoint 0.2.14

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for metaflow-checkpoint 0.2.14
File Size Uploaded Provenance
metaflow_checkpoint-0.2.14.tar.gz 88.1 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for metaflow-checkpoint 0.2.14
File Interpreter ABI Platform
metaflow_checkpoint-0.2.14-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 201.3 kB

Release files / metaflow_checkpoint-0.2.14.tar.gz

Download URL metaflow_checkpoint-0.2.14.tar.gz
Size 88.1 kB
Tags Source
SHA-256 checksum
How to use checksums
05ab9a10d32d1c9ce8030ccd4fc95fb825e46ee729223de0e5c8edb2b3c8e30f
BLAKE2b-256 checksum
How to use checksums
150b22dc7932f53e6c743102aebbd04be4afe1187052ca07e763145fddbb4966
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 11, 2026.

Transparency log

Release files / metaflow_checkpoint-0.2.14-py2.py3-none-any.whl

Download URL metaflow_checkpoint-0.2.14-py2.py3-none-any.whl
Size 113.2 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
80b416f4e153b406e3b76564b7b1720aeb08f270947a1a783d366ba801c0acfb
BLAKE2b-256 checksum
How to use checksums
0f8e634f4bb5c4c4bb45d19146e14ee6a02ad112c776fd2496c5f4c9c3ad22c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 11, 2026.

Transparency log

Security for metaflow-checkpoint 0.2.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for metaflow_checkpoint-0.2.14.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 11, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.2.14 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page