Skip to content

Commit 0b93459

Browse files
author
Larry Franks
committed
edits
1 parent bbc242e commit 0b93459

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

articles/machine-learning/service/how-to-manage-runs.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,7 @@ In Azure Machine Learning service, you can use properties and tags to help organ
233233

234234
### Add properties and tags
235235

236-
> [!NOTE]
237-
> Properties and tags can only be added using the SDK.
236+
#### Using the SDK
238237

239238
To add searchable metadata to your runs, use the [`add_properties()`](https://docs.microsoft.com/python/api/azureml-core/azureml.core.run(class)?view=azure-ml-py#add-properties-properties-) method. For example, the following code adds the `"author"` property to the run:
240239

@@ -269,18 +268,31 @@ local_script_run.tag("worth another look")
269268
print(local_script_run.get_tags())
270269
```
271270

271+
#### Using the CLI
272+
273+
> [!NOTE]
274+
> Using the CLI, you can only add or update tags.
275+
276+
To add or update a tag, use the following command:
277+
278+
```azurecli-interactive
279+
az ml run update -r runid --add-tag quality='fantastic run'
280+
```
281+
282+
For more information, see [az ml run update](https://docs.microsoft.com/cli/azure/ext/azure-cli-ml/ml/run?view=azure-cli-latest#ext-azure-cli-ml-az-ml-run-update).
283+
272284
### Query properties and tags
273285

274286
You can query runs within an experiment to return a list of runs that match specific properties and tags.
275287

276-
### Using the SDK
288+
#### Using the SDK
277289

278290
```Python
279291
list(exp.get_runs(properties={"author":"azureml-user"},tags={"quality":"fantastic run"}))
280292
list(exp.get_runs(properties={"author":"azureml-user"},tags="worth another look"))
281293
```
282294

283-
### Using the CLI
295+
#### Using the CLI
284296

285297
The Azure CLI supports [JMESPath](http://jmespath.org) queries, which can be used to filter runs based on properties and tags. To use a JMESPath query with the Azure CLI, specify it with the `--query` parameter. The following examples show basic queries using properties and tags:
286298

0 commit comments

Comments
 (0)