Skip to content

Commit a4760d8

Browse files
committed
edits per review feedback
1 parent 54e87da commit a4760d8

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

articles/machine-learning/how-to-manage-models-mlflow.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ms.author: mopeakande
88
ms.reviewer: fasantia
99
ms.service: azure-machine-learning
1010
ms.subservice: core
11-
ms.date: 08/08/2024
11+
ms.date: 08/20/2024
1212
ms.topic: concept-article
1313
ms.custom: how-to
1414

@@ -59,14 +59,17 @@ If you have an MLflow model logged inside a run, and you want to register it in
5959
mlflow.register_model(f"runs:/{run_id}/{artifact_path}", model_name)
6060
```
6161

62+
> [!NOTE]
63+
> Models can only be registered to the registry in the same workspace where the run was tracked. Cross-workspace operations aren't currently supported in Azure Machine Learning.
64+
6265
> [!TIP]
6366
> Register models from runs or by using the `mlflow.<flavor>.log_model` method from inside the run. This approach preserves lineage from the job that generated the asset.
6467
6568
### Create models from assets
6669

6770
If you have a folder with an **MLModel** MLflow model, you can register it directly. There's no need for the model to be always in the context of a run. For this approach, you can use the URI schema `file://path/to/model` to register MLflow models stored in the local file system.
6871

69-
The following code creates a simple model by using the `Scikit-Learn` package and saves the model in MLflow format in local storage:
72+
The following code creates a simple model by using the `scikit-learn` package and saves the model in MLflow format in local storage:
7073

7174
```python
7275
from sklearn import linear_model
@@ -160,20 +163,20 @@ You can see the model versions for each model stage by retrieving the model from
160163
client.get_latest_versions(model_name, stages=["Staging"])
161164
```
162165

163-
Multiple model versions can be in the same stage at the same time in MLflow. In the previous example, the method returns the latest version (most recently published) among all versions for the stage.
166+
Multiple model versions can be in the same stage at the same time in MLflow. In the previous example, the method returns the latest (most recent) version among all versions for the stage.
164167

165168
> [!IMPORTANT]
166169
> In the MLflow SDK, stage names are case sensitive.
167170
168-
### Transition models
171+
### Transition model version
169172

170173
Transitioning a model version to a particular stage can be done by using the MLflow client:
171174

172175
```python
173176
client.transition_model_version_stage(model_name, version=3, stage="Staging")
174177
```
175178

176-
When you transition a model version to a particular stage, if the stage has other model versions, the existing versions remain unchanged. This behavior is by default.
179+
When you transition a model version to a particular stage, if the stage already has other model versions, the existing versions remain unchanged. This behavior applies by default.
177180

178181
Another approach is to set the `archive_existing_versions=True` parameter during the transition. This approach instructs MLflow to move any existing model versions to the stage `Archived`:
179182

@@ -202,7 +205,7 @@ Editing registered models is supported in both MLflow and Azure Machine Learning
202205
203206
### Edit model description and tags
204207

205-
You can edit information about a model by using the MLflow SDK, including the description and tags:
208+
You can edit a model's description and tags by using the MLflow SDK:
206209

207210
```python
208211
client.update_model_version(model_name, version=1, description="My classifier description")
@@ -231,7 +234,7 @@ client.delete_model_version(model_name, version="2")
231234
> [!NOTE]
232235
> Machine Learning doesn't support deleting the entire model container. To achieve this task, delete all model versions for a given model.
233236
234-
## Review support for managing models with MLflow
237+
## Review supported capabilities for managing models
235238

236239
The MLflow client exposes several methods to retrieve and manage models. The following table lists the methods currently supported in MLflow when connected to Azure Machine Learning. The table also compares MLflow with other models management capabilities in Azure Machine Learning.
237240

@@ -256,11 +259,11 @@ The MLflow client exposes several methods to retrieve and manage models. The fol
256259

257260
Table footnotes:
258261

259-
- 1: Use Uniform Resource Identifiers (URIs) with the format `runs:/<ruin-id>/<path>`.
260-
- 2: Use URIs with the format `azureml://jobs/<job-id>/outputs/artifacts/<path>`.
261-
- 3: Registered models are immutable objects in Azure Machine Learning.
262-
- 4: Use the search box in Azure Machine Learning studio. Partial matching is supported.
263-
- 5: Use [registries](how-to-manage-registries.md) to move models across different workspaces and preserve lineage.
262+
- <sup>1</sup> Use Uniform Resource Identifiers (URIs) with the format `runs:/<ruin-id>/<path>`.
263+
- <sup>2</sup> Use URIs with the format `azureml://jobs/<job-id>/outputs/artifacts/<path>`.
264+
- <sup>3</sup> Registered models are immutable objects in Azure Machine Learning.
265+
- <sup>4</sup> Use the search box in Azure Machine Learning studio. Partial matching is supported.
266+
- <sup>5</sup> Use [registries](how-to-manage-registries.md) to move models across different workspaces and preserve lineage.
264267

265268
## Related content
266269

0 commit comments

Comments
 (0)