You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/machine-learning/concept-mlflow.md
+25-23Lines changed: 25 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ ms.author: mopeakande
8
8
ms.reviewer: fasantia
9
9
ms.service: azure-machine-learning
10
10
ms.subservice: mlops
11
-
ms.date: 09/18/2024
11
+
ms.date: 09/19/2024
12
12
ms.topic: conceptual
13
13
ms.custom: cliv2, sdkv2
14
14
---
@@ -19,20 +19,22 @@ ms.custom: cliv2, sdkv2
19
19
20
20
This article describes the capabilities and advantages of [MLflow](https://www.mlflow.org), an open-source framework designed to manage the complete machine learning lifecycle. MLflow can train and serve models on different platforms. You can use a consistent set of tools whether your experiments are running locally or on a remote compute target, virtual machine, or Azure Machine Learning compute instance.
21
21
22
-
Azure Machine Learning workspaces are MLflow-compatible, which means that you can use an Azure Machine Learning workspace the same way you use an MLflow server. This compatibility has the following advantages:
22
+
Azure Machine Learning workspaces are MLflow-compatible, which means that you can use an Azure Machine Learning workspace the same way you use a MLflow server. This compatibility has the following advantages:
23
23
24
24
- Azure Machine Learning doesn't host MLflow server instances, but can use the MLflow APIs directly.
25
25
- You can use an Azure Machine Learning workspace as your tracking server for any MLflow code, whether or not it runs in Azure Machine Learning. You only need to configure MLflow to point to the workspace where the tracking should occur.
26
26
- You can run any training routine that uses MLflow in Azure Machine Learning without making any changes.
27
27
28
28
> [!TIP]
29
-
> Unlike the Azure Machine Learning SDK v1, there's no logging functionality in the v2 SDK. You can use MLflow logging to ensure that your training routines are cloud-agnostic and portable, removing any dependency your code has on Azure Machine Learning.
29
+
> Unlike the Azure Machine Learning SDK v1, there's no logging functionality in the v2 SDK. You can use MLflow logging to ensure that your training routines are cloud-agnostic, portable, and have no dependency on Azure Machine Learning.
30
30
31
31
## Tracking with MLflow
32
32
33
-
Azure Machine Learning uses MLflow tracking to log metrics and store artifacts for your experiments. When you're connected to Azure Machine Learning, all the tracking MLflow performs is materialized in the workspace you're working in. For more information about setting up your experiments to use MLflow for tracking experiments and training routines, see [Log metrics, parameters, and files with MLflow](how-to-log-view-metrics.md). You can also use MLflow to [query and compare experiments and runs](how-to-track-experiments-mlflow.md).
33
+
Azure Machine Learning uses MLflow tracking to log metrics and store artifacts for your experiments. When you're connected to Azure Machine Learning, all MLflow tracking materializes in the workspace you're working in.
34
34
35
-
MLflow in Azure Machine Learning provides a way to centralize tracking. You can connect MLflow to Azure Machine Learning workspaces even when you're working locally or in a different cloud. The workspace provides a centralized, secure, and scalable location to store training metrics and models.
35
+
To learn how to set up MLflow tracking for experiments and training routines, see [Log metrics, parameters, and files with MLflow](how-to-log-view-metrics.md). You can also [query and compare experiments and runs with MLflow](how-to-track-experiments-mlflow.md).
36
+
37
+
MLflow in Azure Machine Learning provides a way to centralize tracking. You can connect MLflow to Azure Machine Learning workspaces even when you're working locally or in a different cloud. The Azure Machine Learning workspace provides a centralized, secure, and scalable location to store training metrics and models.
36
38
37
39
MLflow in Azure Machine Learning can:
38
40
@@ -48,64 +50,64 @@ MLflow support in R has the following limitations:
48
50
- Interactive training on RStudio, Posit (formerly RStudio Workbench), or Jupyter notebooks with R kernels isn't supported.
49
51
- Model management and registration aren't supported. Use the Azure Machine Learning CLI or Azure Machine Learning studio for model registration and management.
50
52
51
-
For examples of using the MLflow tracking client with Azure Machine Learning, see [Train R models using the Azure Machine Learning CLI (v2)](https://github.com/Azure/azureml-examples/tree/main/cli/jobs/single-step/r).
53
+
For examples of using the MLflow tracking client with R models in Azure Machine Learning, see [Train R models using the Azure Machine Learning CLI (v2)](https://github.com/Azure/azureml-examples/tree/main/cli/jobs/single-step/r).
52
54
53
55
### Tracking with MLflow in Java
54
56
55
57
MLflow support in Java has the following limitations:
56
58
57
59
- MLflow tracking is limited to tracking experiment metrics and parameters on Azure Machine Learning jobs.
58
-
- Artifacts and models can't be tracked. Instead, use the `Outputs` folder in jobs along with the `mlflow.save_model` method to save models or artifacts that you want to capture.
60
+
- Artifacts and models can't be tracked. Instead, use the `mlflow.save_model` method with the `outputs` folder in jobs to save models or artifacts that you want to capture.
59
61
60
62
For a simple Java example that uses the MLflow tracking client with the Azure Machine Learning tracking server, see [azuremlflow-java](https://github.com/Azure/azureml-examples/tree/main/cli/jobs/single-step/java/iris).
61
63
62
-
### Example tracking with MLflow notebooks
64
+
### Example notebooks for MLflow tracking
63
65
64
66
-[Training and tracking an XGBoost classifier with MLflow](https://github.com/Azure/azureml-examples/blob/main/sdk/python/using-mlflow/train-and-log/xgboost_classification_mlflow.ipynb) demonstrates how to use MLflow to track experiments, log models, and combine multiple flavors into pipelines.
65
67
-[Training and tracking an XGBoost classifier with MLflow using service principal authentication](https://github.com/Azure/azureml-examples/blob/main/sdk/python/using-mlflow/train-and-log/xgboost_service_principal.ipynb) demonstrates how to use MLflow to track experiments from a compute that's running outside Azure Machine Learning. The example shows how to authenticate against Azure Machine Learning services by using a service principal.
66
-
-[Hyperparameter optimization using HyperOpt and nested runs in MLflow](https://github.com/Azure/azureml-examples/blob/main/sdk/python/using-mlflow/train-and-log/xgboost_nested_runs.ipynb) demonstrates how to use child runs to do hyperparameter optimization for models by using the popular library HyperOpt. The example shows how to transfer metrics, parameters, and artifacts from child runs to parent runs.
68
+
-[Hyperparameter optimization using HyperOpt and nested runs in MLflow](https://github.com/Azure/azureml-examples/blob/main/sdk/python/using-mlflow/train-and-log/xgboost_nested_runs.ipynb) demonstrates how to use child runs to do hyperparameter optimization for models by using the popular HyperOpt library. The example shows how to transfer metrics, parameters, and artifacts from child runs to parent runs.
67
69
-[Logging models with MLflow](https://github.com/Azure/azureml-examples/blob/main/sdk/python/using-mlflow/train-and-log/logging_and_customizing_models.ipynb) demonstrates how to use the concept of models instead of artifacts with MLflow. The example also shows how to construct custom models.
68
-
-[Manage runs and experiments with MLflow](https://github.com/Azure/azureml-examples/blob/main/sdk/python/using-mlflow/runs-management/run_history.ipynb) demonstrates how to use MLflor to query experiments, runs, metrics, parameters, and artifacts from Azure Machine Learning.
70
+
-[Manage runs and experiments with MLflow](https://github.com/Azure/azureml-examples/blob/main/sdk/python/using-mlflow/runs-management/run_history.ipynb) demonstrates how to use MLflow to query experiments, runs, metrics, parameters, and artifacts from Azure Machine Learning.
69
71
70
-
## Model registries with MLflow
72
+
## Model registration with MLflow
71
73
72
-
Azure Machine Learning supports MLflow for model management. This support represents a convenient way to support the entire model lifecycle for users that are familiar with the MLflow client. For more information about how to manage models by using the MLflow API in Azure Machine Learning, see [Manage model registries in Azure Machine Learning with MLflow](how-to-manage-models-mlflow.md).
74
+
Azure Machine Learning supports MLflow for model management. This support is a convenient way for users who are familiar with the MLflow client to manage the entire model lifecycle. For more information about how to manage models by using the MLflow API in Azure Machine Learning, see [Manage model registries in Azure Machine Learning with MLflow](how-to-manage-models-mlflow.md).
73
75
74
-
### Example MLflow model registry notebook
76
+
### Example notebook for MLflow model registration
75
77
76
-
-[Model management with MLflow](https://github.com/Azure/azureml-examples/blob/main/sdk/python/using-mlflow/model-management/model_management.ipynb) demonstrates how to manage models in registries.
78
+
[Model management with MLflow](https://github.com/Azure/azureml-examples/blob/main/sdk/python/using-mlflow/model-management/model_management.ipynb) demonstrates how to manage models in registries.
77
79
78
80
## Model deployment with MLflow
79
81
80
-
You can deploy MLflow models to Azure Machine Learning and take advantage of an improved experience. Azure Machine Learning supports deployment of MLflow models to both real-time and batch endpoints without having to specify an environment or a scoring script.
82
+
You can deploy MLflow models to Azure Machine Learning to take advantage of an improved experience. Azure Machine Learning supports deployment of MLflow models to both real-time and batch endpoints without having to specify an environment or a scoring script.
81
83
82
84
The MLflow SDK, Azure Machine Learning CLI, Azure Machine Learning SDK for Python, and Azure Machine Learning studio all support MLflow model deployment. For more information about deploying MLflow models to Azure Machine Learning for both real-time and batch inferencing, see [Guidelines for deploying MLflow models](how-to-deploy-mlflow-models.md).
83
85
84
-
### Example MLflow model deployment notebooks
86
+
### Example notebooks for MLflow model deployment
85
87
86
88
-[Deploy MLflow to online endpoints](https://github.com/Azure/azureml-examples/blob/main/sdk/python/using-mlflow/deploy/mlflow_sdk_online_endpoints.ipynb) demonstrates how to deploy MLflow models to online endpoints using the MLflow SDK.
87
89
-[Progressive rollout of MLflow deployments](https://github.com/Azure/azureml-examples/blob/main/sdk/python/using-mlflow/deploy/mlflow_sdk_online_endpoints_progresive.ipynb) demonstrates how to deploy MLflow models to online endpoints using the MLflow SDK with progressive model rollout. The example also shows deployment of multiple versions of a model to the same endpoint.
88
90
-[Deploy MLflow models to legacy web services](https://github.com/Azure/azureml-examples/blob/main/sdk/python/using-mlflow/deploy/mlflow_sdk_web_service.ipynb) demonstrates how to deploy MLflow models to legacy web services (Azure Container Instances or Azure Kubernetes Service v1) using the MLflow SDK.
89
-
-[Train models in Azure Databricks and deploy them on Azure Machine Learning](https://github.com/Azure/azureml-examples/blob/main/sdk/python/using-mlflow/deploy/track_with_databricks_deploy_aml.ipynb) demonstrates how to train models in Azure Databricks and deploy them in Azure Machine Learning. The example covers cases where you also want to track the experiments with the MLflow instance in Azure Databricks.
91
+
-[Train models in Azure Databricks and deploy them on Azure Machine Learning](https://github.com/Azure/azureml-examples/blob/main/sdk/python/using-mlflow/deploy/track_with_databricks_deploy_aml.ipynb) demonstrates how to train models in Azure Databricks and deploy them in Azure Machine Learning. The example also covers tracking experiments with the MLflow instance in Azure Databricks.
You can submit training jobs to Azure Machine Learning by using [MLflow Projects](https://www.mlflow.org/docs/latest/projects.html). You can submit jobs locally with Azure Machine Learning tracking or migrate your jobs to the cloud via [Azure Machine Learning compute](how-to-create-attach-compute-cluster.md).
96
98
97
-
To learn how to submit training jobs with MLflow Projects that use Azure Machine Learning workspaces for tracking, see [Train with MLflow Projects in Azure Machine Learning (preview)](how-to-train-mlflow-projects.md).
99
+
To learn how to submit training jobs that use MLflow Projects to Azure Machine Learning workspaces for tracking, see [Train with MLflow Projects in Azure Machine Learning (preview)](how-to-train-mlflow-projects.md).
98
100
99
-
### Example MLflow Projects notebooks
101
+
### Example notebooks for MLflow Projects
100
102
101
103
-[Train with MLflow Projects on local compute](https://github.com/Azure/MachineLearningNotebooks/blob/master/how-to-use-azureml/track-and-monitor-experiments/using-mlflow/train-projects-local/train-projects-local.ipynb).
102
104
-[Train with MLflow Projects on Azure Machine Learning compute](https://github.com/Azure/MachineLearningNotebooks/blob/master/how-to-use-azureml/track-and-monitor-experiments/using-mlflow/train-projects-remote/train-projects-remote.ipynb).
103
105
104
-
## MLflow SDK, Azure Machine Learning v2, and Azure Machine Learning studio capabilities
106
+
## MLflow vs Azure Machine Learning client tools capabilities
105
107
106
-
The following table shows the machine learning lifecycle operations that are possible with each of the Azure Machine Learning client tools.
108
+
The following table shows machine learning lifecycle operations that are possible with the MLflow SDK and the Azure Machine Learning client tools.
| Deploy MLflow models to Azure Machine Learning (online and batch) |Deployment of MLflow models for batch inference isn't currently supported.<sup>2</sup> |**✓**|**✓**|
120
+
| Deploy MLflow models to Azure Machine Learning (online and batch) |Deploying MLflow models for batch inference isn't currently supported.<sup>2</sup> |**✓**|**✓**|
119
121
| Deploy non-MLflow models to Azure Machine Learning ||**✓**|**✓**|
120
122
121
123
<sup>1</sup> For more information, see [Manage model registries in Azure Machine Learning with MLflow](how-to-manage-models-mlflow.md).
0 commit comments