Skip to content

Commit 42bf474

Browse files
committed
try h5
1 parent f2f684e commit 42bf474

File tree

1 file changed

+42
-42
lines changed

1 file changed

+42
-42
lines changed

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

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -229,70 +229,70 @@ 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

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

238-
Example:
238+
Example:
239239

240-
# [Azure CLI](#tab/cli)
240+
# [Azure CLI](#tab/cli)
241241

242-
```azurecli
243-
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)
245247

246-
# [Python SDK](#tab/python)
248+
```python
249+
from azure.ai.ml.entities import Model
250+
from azure.ai.ml.constants import ModelType
247251

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+
```
261261

262262
---
263263

264-
- **azureml://jobs URI format**
264+
##### azureml://jobs URI format
265265

266-
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.
266+
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.
267267

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.
269269

270-
Format: `azureml://jobs/<run-id>/outputs/<output-name>/paths/<path-to-model>`
270+
Format: `azureml://jobs/<run-id>/outputs/<output-name>/paths/<path-to-model>`
271271

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>`
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>`
276276

277-
Example:
278-
279-
# [Azure CLI](#tab/cli)
277+
Example:
280278

281-
Save a model from a named output folder:
279+
# [Azure CLI](#tab/cli)
282280

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+
```
286286

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).
288288

289-
# [Python SDK](#tab/python)
289+
# [Python SDK](#tab/python)
290290

291-
Save a model from a named output:
291+
Save a model from a named output:
292292

293-
[!notebook-python[] (~/azureml-examples-main/sdk/python/assets/model/model.ipynb?name=run_model)]
293+
[!notebook-python[] (~/azureml-examples-main/sdk/python/assets/model/model.ipynb?name=run_model)]
294294

295-
For a complete example, see the [model notebook](https://github.com/Azure/azureml-examples/blob/main/sdk/python/assets/model/model.ipynb).
295+
For a complete example, see the [model notebook](https://github.com/Azure/azureml-examples/blob/main/sdk/python/assets/model/model.ipynb).
296296

297297
---
298298

0 commit comments

Comments
 (0)