Implementation:Mlflow Mlflow Pyproject Configuration
| Knowledge Sources | |
|---|---|
| Domains | Build Configuration, Package Management |
| Last Updated | 2026-02-13 20:00 GMT |
Overview
Central TOML configuration file that defines the MLflow Python package metadata, dependencies, optional extras, development tool settings, and CI tooling configuration for the development environment.
Description
This file is auto-generated by dev/pyproject.py and defines the package metadata for mlflow during development. It is replaced by pyproject.release.toml when building release distributions. The file encompasses several key sections:
Build System: Uses setuptools as the build backend.
Package Metadata: Defines the package name (mlflow), development version (3.10.1.dev0), Python requirement (>=3.10), and classifiers. The package is maintained by Databricks and licensed under the Apache License.
Core Dependencies: Specifies approximately 35 runtime dependencies including Flask, SQLAlchemy, pandas, numpy, protobuf, OpenTelemetry, PyArrow, pydantic, scikit-learn, and others with version constraints.
Optional Dependencies (Extras): Provides several optional dependency groups:
- extras - Cloud storage (S3, GCS, Azure), Kubernetes, Prometheus
- db - Database drivers (MySQL, PostgreSQL, MSSQL)
- databricks - Azure Data Lake, GCS, boto3, databricks-agents
- gateway - AI Gateway dependencies (aiohttp, tiktoken, fastapi)
- genai - GenAI dependencies including litellm and gepa
- mcp - Model Context Protocol (fastmcp)
- langchain, auth, mlserver, sqlserver, aliyun-oss, jfrog
Entry Points: Defines the mlflow CLI command, app plugins (basic-auth), and deployment targets (databricks, http, https, openai).
Dependency Groups: Development dependency groups for dev, lint, test, build, docs, and pytest.
Tool Configuration: Includes comprehensive settings for:
- uv - Package manager constraints, workspace members, PyTorch CPU index
- ruff - Linter/formatter with 60+ selected rules, per-file ignores, isort configuration, banned APIs
- clint - Custom MLflow linter exclusions and rule configuration
- typos - Spell checker with ML-specific word allowlist and regex ignore patterns
- pytest - Test runner configuration with strict markers and filter warnings
- mypy - Type checking configuration (strict mode, Python 3.10)
Usage
This file is used automatically by pip, uv, setuptools, and various development tools. Developers interact with it indirectly when running uv sync, uv run pytest, uv run ruff check, or python -m build. The package metadata section should not be edited manually -- use dev/pyproject.py instead. The tool settings section can be updated manually.
Code Reference
Source Location
- Repository: Mlflow_Mlflow
- File: pyproject.toml
- Lines: 1-567
Signature
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[project]
name = "mlflow"
version = "3.10.1.dev0"
requires-python = ">=3.10"
[project.scripts]
mlflow = "mlflow.cli:cli"
[tool.ruff]
line-length = 100
target-version = "py310"
[tool.pytest]
timeout = "1200"
[tool.mypy]
python_version = "3.10"
strict = true
Import
# Not imported directly; consumed by build tools
pip install -e .
uv sync
python -m build
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| N/A | N/A | N/A | This is a declarative configuration file with no runtime inputs. It is read by build tools, linters, and the package manager. |
Outputs
| Name | Type | Description |
|---|---|---|
| Package metadata | TOML sections | Defines the installable mlflow package with version, dependencies, and entry points |
| Tool configurations | TOML sections | Configures ruff, clint, typos, pytest, mypy, and uv for development workflows |
Usage Examples
Installing MLflow in Development Mode
# Install with all development dependencies
uv sync
# Install with specific optional extras
pip install -e ".[gateway,genai]"
# Install with database drivers
pip install -e ".[db]"
Running Configured Tools
# Run ruff with settings from pyproject.toml
uv run ruff check . --fix
uv run ruff format .
# Run pytest with configured options
uv run pytest tests/
# Run the MLflow CLI (defined as entry point)
mlflow server