## Overview

MLflow is a machine learning platform. Learn more in the [official MLflow documentation](https://mlflow.org/).

The DataHub integration for MLflow covers ML entities such as models, features, and related lineage metadata. It also captures tags and stateful deletion detection.

## Concept Mapping

|                                        Source Concept                                         |                                             DataHub Concept                                              | Notes                                                                                                                                                                                                                                                                                                |
| :-------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|     [`Registered Model`](https://mlflow.org/docs/latest/model-registry/#registered-model)     |        [`MlModelGroup`](https://docs.datahub.com/docs/generated/metamodel/entities/mlmodelgroup/)        | The name of a Model Group is the same as a Registered Model's name (e.g. my_mlflow_model). Registered Models serve as containers for multiple versions of the same model in MLflow.                                                                                                                  |
|        [`Model Version`](https://mlflow.org/docs/latest/model-registry/#model-version)        |             [`MlModel`](https://docs.datahub.com/docs/generated/metamodel/entities/mlmodel/)             | The name of a Model is `{registered_model_name}{model_name_separator}{model_version}` (e.g. my_mlflow_model_1 for Registered Model named my_mlflow_model and Version 1, my_mlflow_model_2, etc.). Each Model Version represents a specific iteration of a model with its own artifacts and metadata. |
|             [`Experiment`](https://mlflow.org/docs/latest/tracking/#experiments)              |           [`Container`](https://docs.datahub.com/docs/generated/metamodel/entities/container/)           | Each Experiment in MLflow is mapped to a Container in DataHub. Experiments organize related runs and serve as logical groupings for model development iterations, allowing tracking of parameters, metrics, and artifacts.                                                                           |
|                    [`Run`](https://mlflow.org/docs/latest/tracking/#runs)                     | [`DataProcessInstance`](https://docs.datahub.com/docs/generated/metamodel/entities/dataprocessinstance/) | Captures the run's execution details, parameters, metrics, and lineage to a model.                                                                                                                                                                                                                   |
| [`Model Stage`](https://mlflow.org/docs/latest/model-registry/#deprecated-using-model-stages) |                 [`Tag`](https://docs.datahub.com/docs/generated/metamodel/entities/tag/)                 | The mapping between Model Stages and generated Tags is the following:<br/>- Production: mlflow_production<br/>- Staging: mlflow_staging<br/>- Archived: mlflow_archived<br/>- None: mlflow_none. Model Stages indicate the deployment status of each version.                                        |
