-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
Blog Post Submission
Post Type
- Deep Dive
- How-To
- Features
Topics
- Advanced
- Core
Title
Reproducible Model Dependencies with uv and MLflow
Abstract
This post covers MLflow's integration with uv, the fast Python package manager from Astral. When you work in a uv-managed project, MLflow automatically detects uv.lock and pyproject.toml, runs uv export to capture the complete pinned dependency graph, and saves the lockfile as a model artifact for exact environment restoration via uv sync.
The post covers:
- The reproducibility problem - why
pip freezefails for ML model dependencies (missing transitive deps, environment bleed, no platform markers) - Zero-config auto-detection - MLflow detects uv projects automatically, no parameters needed
- Monorepo support -
uv_project_pathfor projects where the lockfile is in a different directory - Dependency groups and extras -
uv_groupsanduv_extrasfor selective dependency export - How it works - architecture diagram showing the log-time and restore-time flows with graceful pip fallback
- Environment variables -
MLFLOW_UV_AUTO_DETECTandMLFLOW_LOG_UV_FILESfor fine-grained control
Target Length
~1500 words
Related Artifacts
- Core uv support: Add UV package manager support for automatic dependency inference mlflow#20344 (+1,780 lines, merged)
- Dependency groups/extras: Add uv_groups and uv_extras params for uv dependency group control mlflow#20935 (merged)
- Documentation and examples: Add uv dependency management guide to model dependencies docs mlflow#21528 (open)
- uv docs: uv documentation
Provenance
- Implementation: @debu-sinha
- Code review: @WeichenXu123, @harupy
- Blog requested by: @WeichenXu123 on PR #21528
Consent Acknowledgment
- I have obtained consent from all individuals/organizations mentioned by name
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels