Overview
Metaflow automatically versions every execution of your flow, enabling you to track changes, reproduce results, and compare runs over time.Automatic Versioning
Every time you run a flow, Metaflow creates a unique run ID and tracks:- Code version and dependencies
- Parameter values
- Artifacts produced
- Execution metadata
- Runtime environment
Version Information
Metaflow tracks version information through multiple mechanisms:Git-based Versioning
When running from a Git repository, Metaflow captures:Version String Format
The version string contains:- Tag: Base version (e.g.,
2.3.0) - Post: Commits since tag (e.g.,
.post5) - Hash: Git commit hash (e.g.,
-gitabc1234) - Dirty: Uncommitted changes (e.g.,
-dirty)
Accessing Run History
Use the Client API to access historical runs:Get Specific Runs
Filter by Tags
Tracking Code Changes
Metaflow stores a snapshot of your code with every run:Comparing Code Versions
Parameter Versioning
Parameters are automatically tracked with each run:Artifact Versioning
Every artifact is versioned and stored:Reproducibility
Metaflow enables full reproducibility:Resume Failed Runs
Clone Runs
Reproduce Results
INFO File
Metaflow stores version information in an INFO file during execution:- Metaflow version
- Extension versions
- Flow metadata
- Environment information
Environment Tracking
Metaflow captures the execution environment:Comparing Runs
Compare multiple runs to track progress:Production Versioning Best Practices
Use semantic versioning for models
Use semantic versioning for models
Include version in your parameters:
Tag production runs
Tag production runs
Tag runs deployed to production:
Track experiment lineage
Track experiment lineage
Link related experiments:
Document breaking changes
Document breaking changes
Use artifacts to document changes:
Version Control Integration
Integrate with Git for complete version control:Next Steps
Tagging
Learn how to tag runs and artifacts
Best Practices
Follow versioning best practices
