Skip to content

Commit dca96d7

Browse files
authored
Update how-to-use-mlflow-cli-runs.md
1 parent 11d9915 commit dca96d7

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

articles/machine-learning/how-to-use-mlflow-cli-runs.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -240,27 +240,29 @@ Select the logged metrics to render charts on the right side. You can customize
240240

241241
You can also access or __query metrics, parameters and artifacts programatically__ using the MLflow SDK. Use [mlflow.get_run()](https://mlflow.org/docs/latest/python_api/mlflow.html#mlflow.get_run) as explained bellow:
242242

243-
> [!TIP]
244-
> For more details about how to retrieve information from experiments and runs in Azure Machine Learning using MLflow view [Query & compare experiments and runs with MLflow](how-to-track-experiments-mlflow.md).
245-
246243
```python
247244
import mlflow
248245

249246
run = mlflow.get_run("<RUN_ID>")
250247

251248
metrics = run.data.metrics
252-
tags = run.data.tags
253249
params = run.data.params
250+
tags = run.data.tags
254251

255-
print(metrics,tags,params)
252+
print(metrics, params, tags)
256253
```
257254

255+
> [!TIP]
256+
> For metrics, the previous example will only return the last value of a given metric. If you want to retrieve all the values of a given metric, use `mlflow.get_metric_history` method as explained at [Getting params and metrics from a run](how-to-track-experiments-mlflow.md#getting-params-and-metrics-from-a-run).
257+
258258
To download artifacts you have logged, like files and models, you can use [mlflow.artifacts.download_artifacts()](https://www.mlflow.org/docs/latest/python_api/mlflow.artifacts.html#mlflow.artifacts.download_artifacts)
259259

260260
```python
261261
mlflow.artifacts.download_artifacts(run_id="<RUN_ID>", artifact_path="helloworld.txt")
262262
```
263263

264+
For more details about how to __retrieve or compare__ information from experiments and runs in Azure Machine Learning using MLflow view [Query & compare experiments and runs with MLflow](how-to-track-experiments-mlflow.md)
265+
264266
## Example notebooks
265267

266268
If you are looking for examples about how to use MLflow in Jupyter notebooks, please see our example's repository [Using MLflow (Jupyter Notebooks)](https://github.com/Azure/azureml-examples/tree/main/sdk/python/using-mlflow).

0 commit comments

Comments
 (0)