Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Mlflow Mlflow ML Package Versions

From Leeroopedia
Knowledge Sources
Domains CI/CD, Package Management, Testing, Configuration
Last Updated 2026-02-13 20:00 GMT

Overview

Source-of-truth YAML configuration defining version compatibility ranges, test commands, and dependency requirements for all ML frameworks supported by MLflow.

Description

ml-package-versions.yml is the master configuration file that drives MLflow's cross-version compatibility testing infrastructure. It defines entries for 40+ ML frameworks, each specifying package metadata, supported version ranges, test commands, and conditional dependencies.

Each top-level key in the YAML is a flavor name (e.g., sklearn, pytorch, openai, langchain) and contains the following structure:

package_info: Package metadata including:

  • pip_release -- The PyPI package name (e.g., "scikit-learn" for the sklearn flavor)
  • install_dev -- Shell commands to install the development version from source
  • module_name -- Python import name if different from flavor name (e.g., "torch" for pytorch)
  • repo -- GitHub repository URL for source-based Python version inference
  • genai -- Boolean flag indicating if the package is a GenAI integration

models: and autologging: Test categories, each containing:

  • minimum / maximum -- Supported version range boundaries
  • unsupported -- Version specifiers for known-broken versions (e.g., "== 4.52.1")
  • requirements -- Conditional dependencies keyed by version specifiers (e.g., ">= 0.0.0" for all versions, "< 2.3" for older versions)
  • run -- pytest commands to execute for this category
  • python / java / runs_on -- Version-specific overrides for runtime environments
  • test_every_n_versions -- Sampling rate for testing (e.g., 4 means test every 4th minor version)
  • test_tracing_sdk -- Whether to run tracing SDK test variants
  • allow_unreleased_max_version -- Permit testing versions not yet on PyPI (used for pyspark)
  • pre_test -- Commands to run before tests (e.g., apt-get installs, model downloads)

Covered Frameworks: The file covers traditional ML (sklearn, xgboost, lightgbm, catboost, statsmodels), deep learning (pytorch, pytorch-lightning, keras, tensorflow, transformers, sentence_transformers), NLP (spacy), time series (prophet, pmdarima), big data (spark), ONNX, GenAI model providers (openai, anthropic, gemini, mistral, groq, bedrock), GenAI frameworks (langchain, langgraph, llama_index, dspy, crewai, autogen, ag2, pydantic_ai, smolagents, strands, haystack, agno, semantic_kernel), and utility libraries (litellm, shap, h2o, paddle, johnsnowlabs).

Usage

This file is consumed by dev/set_matrix.py to generate CI test matrices and by dev/update_ml_package_versions.py to keep version ranges current. It is also used to auto-generate mlflow/ml_package_versions.py.

Code Reference

Source Location

Signature

# Top-level structure for each flavor entry
flavor_name:
  package_info:
    pip_release: "package-name"
    install_dev: |
      pip install git+https://github.com/org/repo.git
    module_name: "import_name"
    repo: https://github.com/org/repo/tree/HEAD
    genai: true  # optional, for GenAI packages
  models:
    minimum: "1.0.0"
    maximum: "2.0.0"
    unsupported: ["== 1.5.0"]
    requirements:
      ">= 0.0.0": ["dep1", "dep2"]
      "< 1.5": ["dep3<2.0"]
    run: |
      pytest tests/flavor/test_model_export.py
  autologging:
    minimum: "1.0.0"
    maximum: "2.0.0"
    run: |
      pytest tests/flavor/test_autolog.py
    test_tracing_sdk: true

Import

# Read by set_matrix.py
import yaml
with open("mlflow/ml-package-versions.yml") as f:
    config = yaml.safe_load(f)

# Or via the auto-generated Python module
from mlflow.ml_package_versions import _ML_PACKAGE_VERSIONS, FLAVOR_TO_MODULE_NAME

I/O Contract

Inputs

Name Type Required Description
N/A N/A N/A This is a static configuration file; updated by dev/update_ml_package_versions.py

Outputs

Name Type Description
YAML configuration dict[str, FlavorConfig] Parsed by set_matrix.py into FlavorConfig Pydantic models for test matrix generation
mlflow/ml_package_versions.py Python module Auto-generated derivative containing _ML_PACKAGE_VERSIONS and FLAVOR_TO_MODULE_NAME

Covered Frameworks

Traditional ML

Flavor PyPI Package Categories
sklearn scikit-learn models, autologging
xgboost xgboost models, autologging
lightgbm lightgbm models, autologging
catboost catboost models
statsmodels statsmodels models, autologging
prophet prophet models
pmdarima pmdarima models

Deep Learning

Flavor PyPI Package Categories
pytorch torch models, autologging
pytorch-lightning pytorch-lightning models, autologging
keras keras models, autologging
tensorflow tensorflow models, autologging
transformers transformers models, autologging
sentence_transformers sentence-transformers models

GenAI

Flavor PyPI Package Categories
openai openai models, autologging
langchain langchain models, autologging
langgraph langgraph models, autologging
llama_index llama-index models, autologging
dspy dspy models, autologging
anthropic anthropic autologging
gemini google-genai autologging
crewai crewai autologging
pydantic_ai pydantic-ai autologging
smolagents smolagents autologging
strands strands-agents autologging
bedrock boto3 autologging

Usage Examples

Adding a New Flavor

new_framework:
  package_info:
    pip_release: "new-framework"
    genai: true
    repo: https://github.com/org/new-framework/tree/HEAD
    install_dev: |
      pip install git+https://github.com/org/new-framework
  autologging:
    minimum: "1.0.0"
    maximum: "2.0.0"
    requirements:
      ">= 0.0.0": ["openai"]
    run: |
      pytest tests/new_framework/test_autolog.py
    test_tracing_sdk: true

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment