Implementation:Mlflow Mlflow ML Package Versions Data
| Knowledge Sources | |
|---|---|
| Domains | ML Framework Integration, Version Compatibility |
| Last Updated | 2026-02-13 20:00 GMT |
Overview
Auto-generated Python module that defines ML framework version compatibility ranges for MLflow's model flavors and autologging integrations.
Description
This file is auto-generated by dev/update_ml_package_versions.py from the YAML configuration in mlflow/ml-package-versions.yml and should not be edited manually. It contains three main data structures:
- _ML_PACKAGE_VERSIONS - A comprehensive dictionary mapping ML framework names (e.g., "openai", "sklearn", "pytorch") to their supported version ranges. Each entry includes package_info (pip release name, optional module name) and one or more feature sections (models and/or autologging) specifying minimum and maximum supported versions.
- GENAI_FLAVOR_TO_MODULE_NAME - A mapping from GenAI flavor names to their Python module names, used for autologging version compatibility checks. Covers frameworks like OpenAI, LangChain, Anthropic, Gemini, and others.
- NON_GENAI_FLAVOR_TO_MODULE_NAME - A mapping from traditional ML flavor names to their Python module names, covering frameworks like scikit-learn, PyTorch, TensorFlow, XGBoost, and others.
- FLAVOR_TO_MODULE_NAME - A combined dictionary merging both GenAI and non-GenAI mappings for backward compatibility.
The file covers over 40 ML frameworks across two categories: GenAI packages (OpenAI, LangChain, Anthropic, Gemini, DSPy, LlamaIndex, CrewAI, etc.) and traditional ML packages (scikit-learn, PyTorch, TensorFlow, Keras, XGBoost, LightGBM, Spark, Transformers, etc.).
Usage
This data is consumed internally by MLflow's autologging and model flavor systems to validate that installed package versions fall within supported ranges. It is also used by CI testing to determine which package versions to test against. Do not edit this file manually -- run the update script instead.
Code Reference
Source Location
- Repository: Mlflow_Mlflow
- File: mlflow/ml_package_versions.py
- Lines: 1-491
Signature
# Auto-generated data structures (not functions)
_ML_PACKAGE_VERSIONS: dict[str, dict] # Framework name -> version ranges
GENAI_FLAVOR_TO_MODULE_NAME: dict[str, str] # GenAI flavor -> module name
NON_GENAI_FLAVOR_TO_MODULE_NAME: dict[str, str] # Non-GenAI flavor -> module name
FLAVOR_TO_MODULE_NAME: dict[str, str] # Combined mapping
Import
from mlflow.ml_package_versions import _ML_PACKAGE_VERSIONS
from mlflow.ml_package_versions import FLAVOR_TO_MODULE_NAME
from mlflow.ml_package_versions import GENAI_FLAVOR_TO_MODULE_NAME
from mlflow.ml_package_versions import NON_GENAI_FLAVOR_TO_MODULE_NAME
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| N/A | N/A | N/A | This is a data-only module with no function inputs. It is auto-generated from mlflow/ml-package-versions.yml by dev/update_ml_package_versions.py. |
Outputs
| Name | Type | Description |
|---|---|---|
| _ML_PACKAGE_VERSIONS | dict[str, dict] | Nested dictionary mapping framework name to package_info and version ranges (minimum/maximum) for models and autologging features |
| GENAI_FLAVOR_TO_MODULE_NAME | dict[str, str] | Mapping from GenAI flavor names (e.g., "openai", "langchain") to their importable Python module names |
| NON_GENAI_FLAVOR_TO_MODULE_NAME | dict[str, str] | Mapping from traditional ML flavor names (e.g., "sklearn", "pytorch") to their importable Python module names |
| FLAVOR_TO_MODULE_NAME | dict[str, str] | Merged dictionary of both GenAI and non-GenAI flavor-to-module mappings |
Usage Examples
Checking Supported Version Range
from mlflow.ml_package_versions import _ML_PACKAGE_VERSIONS
# Get supported version range for scikit-learn autologging
sklearn_info = _ML_PACKAGE_VERSIONS["sklearn"]
print(sklearn_info["autologging"]["minimum"]) # e.g., "1.4.1.post1"
print(sklearn_info["autologging"]["maximum"]) # e.g., "1.8.0"
Looking Up Module Name for a Flavor
from mlflow.ml_package_versions import FLAVOR_TO_MODULE_NAME
# Resolve the importable module name for a flavor
module_name = FLAVOR_TO_MODULE_NAME["pytorch"] # Returns "torch"
module_name = FLAVOR_TO_MODULE_NAME["gemini"] # Returns "google.genai"