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/how-to-manage-models.md
+42-42Lines changed: 42 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -229,70 +229,70 @@ If your model data comes from a job output, you have two options for specifying
229
229
>[!NOTE]
230
230
>The *artifacts* reserved keyword represents output from the default artifact location.
231
231
232
-
-**MLflow runs: URIformat**
232
+
##### MLflow runs: URI format
233
233
234
-
This option is optimized for MLflow users, who are probably already familiar with the MLflow `runs:`URIformat. 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:`URIformat. 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.
az ml model create --name my-registered-model --version 1--path runs:/my_run_0000000000/model/--type mlflow_model
244
-
```
242
+
```azurecli
243
+
az ml model create --name my-registered-model --version 1--path runs:/my_run_0000000000/model/--type mlflow_model
244
+
```
245
+
246
+
# [Python SDK](#tab/python)
245
247
246
-
# [Python SDK](#tab/python)
248
+
```python
249
+
from azure.ai.ml.entities import Model
250
+
from azure.ai.ml.constants import ModelType
247
251
248
-
```python
249
-
from azure.ai.ml.entities import Model
250
-
from azure.ai.ml.constants import ModelType
251
-
252
-
run_model= Model(
253
-
path="runs:/my_run_0000000000/model/"
254
-
name="my-registered-model",
255
-
description="Model created from run.",
256
-
type=ModelType.MLFLOW_MODEL
257
-
)
258
-
259
-
ml_client.models.create_or_update(run_model)
260
-
```
252
+
run_model= Model(
253
+
path="runs:/my_run_0000000000/model/"
254
+
name="my-registered-model",
255
+
description="Model created from run.",
256
+
type=ModelType.MLFLOW_MODEL
257
+
)
258
+
259
+
ml_client.models.create_or_update(run_model)
260
+
```
261
261
262
262
---
263
263
264
-
-**azureml://jobs URIformat**
264
+
##### azureml://jobs URI format
265
265
266
-
The `azureml://jobs` reference URI option lets you register a model from artifacts inany 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.
266
+
The `azureml://jobs` reference URI option lets you register a model from artifacts inany 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.
267
267
268
-
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.
268
+
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.
- Default artifact location: `azureml://jobs/<run-id>/outputs/artifacts/paths/<path-to-model>/`. This location is equivalent to MLflow `runs:/<run-id>/<model>`.
273
-
- Named output folder: `azureml://jobs/<run-id>/outputs/<named-output-folder>`
274
-
- Specific file within the named output folder: `azureml://jobs/<run-id>/outputs/<named-output-folder>/paths/<model-filename>`
275
-
- Specific folder path within the named output folder: `azureml://jobs/<run-id>/outputs/<named-output-folder>/paths/<model-folder-name>`
272
+
- Default artifact location: `azureml://jobs/<run-id>/outputs/artifacts/paths/<path-to-model>/`. This location is equivalent to MLflow `runs:/<run-id>/<model>`.
273
+
- Named output folder: `azureml://jobs/<run-id>/outputs/<named-output-folder>`
274
+
- Specific file within the named output folder: `azureml://jobs/<run-id>/outputs/<named-output-folder>/paths/<model-filename>`
275
+
- Specific folder path within the named output folder: `azureml://jobs/<run-id>/outputs/<named-output-folder>/paths/<model-folder-name>`
276
276
277
-
Example:
278
-
279
-
# [Azure CLI](#tab/cli)
277
+
Example:
280
278
281
-
Save a model from a named output folder:
279
+
# [Azure CLI](#tab/cli)
282
280
283
-
```azurecli
284
-
az ml model create --name run-model-example --version 1--path azureml://jobs/my_run_0000000000/outputs/artifacts/paths/model/
285
-
```
281
+
Save a model from a named output folder:
282
+
283
+
```azurecli
284
+
az ml model create --name run-model-example --version 1--path azureml://jobs/my_run_0000000000/outputs/artifacts/paths/model/
285
+
```
286
286
287
-
For a complete example, see the [CLI reference](/cli/azure/ml/model).
287
+
For a complete example, see the [CLI reference](/cli/azure/ml/model).
0 commit comments