This document provides a high-level introduction to MLflow's architecture, core capabilities, and codebase organization. It describes the platform's purpose as a complete ML lifecycle management system and maps high-level concepts to specific code entities (classes, modules, files) to help developers navigate the repository.
For detailed information about specific subsystems:
mlflow, mlflow-skinny, and mlflow-tracing. See Package Distributions.Sources: README.md8-15 pyproject.toml11-15
MLflow is an open-source platform for managing the complete machine learning lifecycle, covering both classical ML and GenAI/LLM applications README.md6-11 It provides:
MlflowClient mlflow/tracking/fluent.py104pyfunc abstraction mlflow/__init__.py94mlflow.evaluate() and GenAI-specific judges mlflow/__init__.py85The platform is implemented primarily in Python with support for TypeScript/JavaScript, Java, and R README.md80 mlflow/java/pom.xml1-11 mlflow/R/mlflow/DESCRIPTION1-4
Sources: README.md6-15 pyproject.toml11-15 mlflow/java/pom.xml1-11 mlflow/R/mlflow/DESCRIPTION1-4 mlflow/version.py5-29 mlflow/__init__.py43-115
MLflow is distributed as three distinct Python packages with shared infrastructure. The build is managed via dev/pyproject.py which auto-generates the distribution metadata pyproject.toml1
Title: Package Component Mapping
Package Definitions:
| Package | Purpose | Key Characteristics |
|---|---|---|
mlflow | Full platform with all features | Includes all flavors, UI, and serving dependencies pyproject.toml11-72 |
mlflow-skinny | Lightweight core tracking | Excludes SQL storage, server, UI, or heavy data science libs libs/skinny/pyproject.toml9-52 |
mlflow-tracing | Tracing SDK for LLM observability | Focused on OpenTelemetry conventions and span capture mlflow/version.py24 |
For details on how these packages are constructed and the flags IS_TRACING_SDK_ONLY, IS_MLFLOW_SKINNY, or IS_FULL_MLFLOW, see Package Distributions.
Sources: mlflow/version.py20-29 pyproject.toml1-72 libs/skinny/pyproject.toml1-52 pyproject.release.toml34-35
MLflow follows a layered client-server architecture where multiple client types communicate with backend services via REST API.
Title: Client and Fluent API Code Entity Interaction
Key Code Entities:
MlflowClient class provides a lower-level CRUD interface for runs, models, and experiments mlflow/tracking/fluent.py104mlflow.tracking.fluent (e.g., start_run, log_param, set_experiment) mlflow/tracking/fluent.py144-148IS_TRACING_SDK_ONLY determine module availability at runtime mlflow/version.py24RunOperations class manages asynchronous logging of metrics and parameters mlflow/tracking/fluent.py64For details on subsystem interactions and design patterns, see System Architecture.
Sources: mlflow/tracking/fluent.py60-106 mlflow/version.py20-29 pyproject.toml33-72 mlflow/__init__.py184-206
MLflow integrates with dozens of ML frameworks (Scikit-Learn, PyTorch, Transformers, etc.) through a unified "flavor" system. These integrations are managed with specific version constraints defined in ml-package-versions.yml mlflow/ml-package-versions.yml1-26
Title: Version Configuration to Code Flavor Mapping
Key Integration Components:
mlflow/ml-package-versions.yml defines the minimum and maximum supported versions for each flavor, as well as test commands mlflow/ml-package-versions.yml9-12autologging hooks mlflow/ml-package-versions.yml14-20Sources: mlflow/ml-package-versions.yml1-210 mlflow/ml_package_versions.py1-210 mlflow/__init__.py65-115
mlflow, mlflow-skinny, and mlflow-tracing builds.