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/reference-migrate-sdk-v1-mlflow-tracking.md
+20-18Lines changed: 20 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,22 +22,19 @@ If you're migrating from SDK v1 to SDK v2, use the information in this section t
22
22
23
23
## Why MLflow?
24
24
25
-
MLflow, with over 13 million monthly downloads, has become the standard platform for end-to-end MLOps, enabling teams of all sizes to track, share, package and deploy any model for batch or real-time inference. By integrating with MLflow, your training code will not need to hold any specific code related to Azure Machine Learning, achieving true portability and seamless integration with other open-source platforms.
25
+
MLflow, with over 13 million monthly downloads, has become the standard platform for end-to-end MLOps, enabling teams of all sizes to track, share, package and deploy any model for batch or real-time inference. Azure Machine Learning integrates with MLflow, which enables your training code to achieve true portability and seamless integration with other platforms since it doesn't hold any Azure Machine Learning specific instructions.
26
26
27
27
## Prepare for migrating to MLflow
28
28
29
-
To use MLflow tracking, you will need to install `mlflow` and `azureml-mlflow` Python packages. All Azure Machine Learning environments have these packages already available for you but you will need to include them if creating your own environment.
29
+
To use MLflow tracking, you need to install Mlflow SDK package `mlflow` and Azure Machine Learning plug-in for MLflow `azureml-mlflow`. All Azure Machine Learning environments have these packages already available for you but you need to include them if creating your own environment.
30
30
31
31
```bash
32
32
pip install mlflow azureml-mlflow
33
33
```
34
34
35
-
> [!TIP]
36
-
> You can use the [`mlflow-skinny`](https://github.com/mlflow/mlflow/blob/master/README_SKINNY.rst) which is a lightweight MLflow package without SQL storage, server, UI, or data science dependencies. This is recommended for users who primarily need the tracking and logging capabilities without importing the full suite of MLflow features including deployments.
37
-
38
35
## Connect to your workspace
39
36
40
-
Azure Machine Learning allows users to perform tracking in training jobs running on your workspace or running remotely (tracking experiments running outside Azure Machine Learning). If performing remote tracking, you will need to indicate the workspace you want to connect MLflow to.
37
+
Azure Machine Learning allows users to perform tracking in training jobs running on your workspace or running remotely (tracking experiments running outside Azure Machine Learning). If performing remote tracking, you need to indicate the workspace you want to connect MLflow to.
41
38
42
39
# [Azure Machine Learning compute](#tab/aml)
43
40
@@ -51,7 +48,7 @@ You are already connected to your workspace when running on Azure Machine Learni
51
48
52
49
**Configure authentication**
53
50
54
-
Once the tracking is configured, you'll also need to configure how the authentication needs to happen to the associated workspace. By default, the Azure Machine Learning plugin for MLflow will perform interactive authentication by opening the default browser to prompt for credentials. Refer to [Configure MLflow for Azure Machine Learning: Configure authentication](how-to-use-mlflow-configure-tracking.md#configure-authentication) for more ways to configure authentication for MLflow in Azure Machine Learning workspaces.
51
+
Once the tracking is configured, you also need to configure how the authentication needs to happen to the associated workspace. By default, the Azure Machine Learning plugin for MLflow performs interactive authentication by opening the default browser to prompt for credentials. Refer to [Configure MLflow for Azure Machine Learning: Configure authentication](how-to-use-mlflow-configure-tracking.md#configure-authentication) for more ways to configure authentication for MLflow in Azure Machine Learning workspaces.
* The string will be logged as an _artifact_, not as a metric. In Azure Machine Learning studio, the value will be displayed in the __Outputs + logs__ tab.
121
+
* The string is logged as an _artifact_, not as a metric. In Azure Machine Learning studio, the value is displayed in the __Outputs + logs__ tab.
125
122
126
123
### Log an image to a PNG or JPEG file
127
124
@@ -137,7 +134,7 @@ __SDK v2 with MLflow__
137
134
mlflow.log_artifact("Azure.png")
138
135
```
139
136
140
-
The image is logged as an artifact and will appear in the __Images__ tab in Azure Machine Learning Studio.
137
+
The image is logged as an artifact and it appears in the __Images__ tab in Azure Machine Learning Studio.
141
138
142
139
### Log a matplotlib.pyplot
143
140
@@ -161,9 +158,7 @@ ax.plot([0, 1], [2, 3])
161
158
mlflow.log_figure(fig, "sample_pyplot.png")
162
159
```
163
160
164
-
* The image is logged as an artifact and will appear in the __Images__ tab in Azure Machine Learning Studio.
165
-
* The `mlflow.log_figure` method is __experimental__.
166
-
161
+
* The image is logged as an artifact and it appears in the __Images__ tab in Azure Machine Learning Studio.
You can access run information using the MLflow run object's `data` and `info` properties. For more information, see [mlflow.entities.Run](https://mlflow.org/docs/latest/python_api/mlflow.entities.html#mlflow.entities.Run) reference.
342
+
You can access run information using the properties `data` and `info` of the MLflow [run (mlflow.entities.Run)](https://mlflow.org/docs/latest/python_api/mlflow.entities.html#mlflow.entities.Run) object.
343
+
344
+
> [!TIP]
345
+
> Experiments and runs tracking information in Azure Machine Learning can be queried using MLflow, which provides a comprehensive search API to query and search for experiments and runs easily, and quickly compare results. For more information about all the capabilities in MLflow in this dimension, see [Query & compare experiments and runs with MLflow](how-to-track-experiments-mlflow.md)
348
346
349
347
The following example shows how to retrieve a finished run:
350
348
@@ -353,7 +351,7 @@ from mlflow.tracking import MlflowClient
353
351
354
352
# Use MlFlow to retrieve the run that was just completed
To download an artifact, use [MlFlowClient.download_artifacts](https://www.mlflow.org/docs/latest/python_api/mlflow.tracking.html#mlflow.tracking.MlflowClient.download_artifacts):
397
+
To download an artifact, use [mlflow.artifacts.download_artifacts](https://www.mlflow.org/docs/latest/python_api/mlflow.tracking.html#mlflow.tracking.MlflowClient.download_artifacts):
0 commit comments