Skip to content

Commit 6e61305

Browse files
committed
touchups
1 parent 4117d9f commit 6e61305

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

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

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ When you use models for inputs or outputs, you can specify one of the following
5656
- `upload`: Upload the data from the compute target.
5757
- `direct`: Pass in the URI as a string.
5858

59-
The following table shows the mode options that are available for different model type inputs and outputs.
59+
The following table shows the available mode options for different model type inputs and outputs.
6060

6161
|Type | `upload` | `download` | `ro_mount` | `rw_mount` | `direct` |
6262
|------ | ------ | :---: | :---: | :---: | :---: | :---: |
@@ -170,7 +170,7 @@ The workspace is the top-level resource for Azure Machine Learning, providing a
170170

171171
### Create the registered model
172172

173-
You can create a registered model from a model:
173+
You can create a registered model from a model that's:
174174

175175
- Located on your local computer.
176176
- Located on an Azure Machine Learning datastore.
@@ -229,16 +229,18 @@ If your model data comes from a job output, you have two options for specifying
229229
>[!NOTE]
230230
>The *artifacts* reserved keyword represents output from the default artifact location.
231231

232-
- **MLflow runs: URI format**
232+
- **MLflow runs:** URI format
233233

234-
This option is optimized for MLflow users, who are probably already familiar with the MLflow `runs:` URI format. This option creates a model from artifacts in the default *artifact* location, where all MLflow-logged models and artifacts are located. This option also establishes a lineage between a registered model and the run the model came from.
234+
This option is optimized for MLflow users, who are probably already familiar with the MLflow `runs:` URI format. This option creates a model from artifacts in the default artifact location, where all MLflow-logged models and artifacts are located. This option also establishes a lineage between a registered model and the run the model came from.
235235

236236
Format: `runs:/<run-id>/<path-to-model-relative-to-the-root-of-the-artifact-location>`
237237

238+
Example:
239+
238240
# [Azure CLI](#tab/cli)
239241

240242
```azurecli
241-
az ml model create --name <registered-model-name> --version 1 --path runs:/<run-id>/<path-to-model>/ --type mlflow_model
243+
az ml model create --name my-registered-model --version 1 --path runs:/my_run_0000000000/model/ --type mlflow_model
242244
```
243245

244246
# [Python SDK](#tab/python)
@@ -248,37 +250,37 @@ If your model data comes from a job output, you have two options for specifying
248250
from azure.ai.ml.constants import ModelType
249251

250252
run_model = Model(
251-
path="runs:/<run-id>/model/"
252-
name="<registered-model-name>",
253+
path="runs:/my_run_0000000000/model/"
254+
name="my-registered-model",
253255
description="Model created from run.",
254-
type=ModelType.mlflow_model
256+
type=ModelType.MLFLOW_MODEL
255257
)
256258

257259
ml_client.models.create_or_update(run_model)
258260
```
259261

260262
---
261-
- **azureml://jobs URI format**
263+
- **azureml://jobs** URI format
262264

263265
The `azureml://jobs` reference URI option lets you register a model from artifacts in any of the job's output paths. This format aligns with the `azureml://datastores` reference URI format, and also supports referencing artifacts from named outputs other than the default artifact location.
264266

265267
If you didn't directly register your model within the training script by using MLflow, you can use this option to establish a lineage between a registered model and the job it was trained from.
266268

267-
Format: `azureml://jobs/<run-id>/outputs/<output-name>/paths/<path-to-model>/`
269+
Format: `azureml://jobs/<run-id>/outputs/<output-name>/paths/<path-to-model>`
268270

269-
- Default artifact location: `azureml://jobs/<run-id>/outputs/artifacts/paths/<path-to-model>/`. This location is equivalent to MLflow `runs:/<run-id>/<model>/`.
271+
- Default artifact location: `azureml://jobs/<run-id>/outputs/artifacts/paths/<path-to-model>/`. This location is equivalent to MLflow `runs:/<run-id>/<model>`.
270272
- Named output folder: `azureml://jobs/<run-id>/outputs/<named-output-folder>`
271273
- Specific file within the named output folder: `azureml://jobs/<run-id>/outputs/<named-output-folder>/paths/<model-filename>`
272-
- Specific folder path within the named output folder: `azureml://jobs/<run-id>/outputs/<named-output-folder>/paths/<model-folder-name>/`
274+
- Specific folder path within the named output folder: `azureml://jobs/<run-id>/outputs/<named-output-folder>/paths/<model-folder-name>`
273275

274-
For example:
276+
Example:
275277

276278
# [Azure CLI](#tab/cli)
277279

278280
Save a model from a named output folder:
279281

280282
```azurecli
281-
az ml model create --name run-model-example --version 1 --path azureml://jobs/<job_name>/outputs/artifacts/paths/model/
283+
az ml model create --name run-model-example --version 1 --path azureml://jobs/my_run_0000000000/outputs/artifacts/paths/model/
282284
```
283285

284286
For a complete example, see the [CLI reference](/cli/azure/ml/model).
@@ -393,7 +395,7 @@ The `Output` class allows you to define:
393395
- Job: `azureml://jobs/<job-name>/outputs/<output-name>/paths/<path-to-model-relative-to-the-named-output-location>`
394396
- Model asset: `azureml:<my_model>:<version>`
395397

396-
The following code creates an output that mounts your AzureML default datastore in read-write mode. The code simply loads the local MLflow model as input and exports the same model as an output of the job saved in the mounted datastore.
398+
The following example creates an output that mounts your default datastore in read-write mode. The code simply loads the local MLflow model as input and exports the same model as an output of the job saved in the mounted datastore.
397399

398400
```python
399401
from azure.ai.ml import command

0 commit comments

Comments
 (0)