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-track-experiments-mlflow.md
+10-8Lines changed: 10 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,7 +69,7 @@ Use MLflow to search for experiments inside of your workspace. See the following
69
69
mlflow.get_experiment('1234-5678-90AB-CDEFG')
70
70
```
71
71
72
-
### Search experiments
72
+
### Searching experiments
73
73
74
74
The `search_experiments()` method, available since Mlflow 2.0, lets you search for experiments that match criteria using `filter_string`.
75
75
@@ -131,7 +131,7 @@ By default, MLflow returns the data in Pandas `Dataframe` format, which makes it
131
131
132
132
All metrics and parameters are also returned when querying runs. However, for metrics that contain multiple values (for instance, a loss curve, or a PR curve), only the last value of the metric is returned. If you want to retrieve all the values of a given metric, uses `mlflow.get_metric_history` method. See [Getting params and metrics from a run](#getting-params-and-metrics-from-a-run) for an example.
133
133
134
-
### Order runs
134
+
### Ordering runs
135
135
136
136
By default, experiments are ordered descending by `start_time`, which is the time the experiment was queued in Azure Machine Learning. However, you can change this default by using the parameter `order_by`.
137
137
@@ -168,7 +168,7 @@ By default, experiments are ordered descending by `start_time`, which is the tim
168
168
> [!WARNING]
169
169
> Using `order_by`with expressions containing `metrics.*`, `params.*`, or`tags.*`in the parameter `order_by` isn't currently supported. Please use the `order_values` method from Pandas as shown in the example.
170
170
171
-
### Filter runs
171
+
### Filtering runs
172
172
173
173
You can also look for a run with a specific combination in the hyperparameters using the parameter `filter_string`. Use `params` to access run's parameters, `metrics` to access metrics logged in the run, and `attributes` to access run information details. MLflow supports expressions joined by the AND keyword (the syntax doesn't support OR):
174
174
@@ -246,6 +246,7 @@ You can also look for a run with a specific combination in the hyperparameters u
246
246
When you filter runs by status, MLflow uses a different convention to name the different possible status of a run compared to Azure Machine Learning. The following table shows the possible values:
247
247
248
248
| Azure Machine Learning job status | MLFlow's `attributes.status` | Meaning |
249
+
| :-: | :-: | :-: |
249
250
| Not started |`Scheduled`| The job/run was received by Azure Machine Learning. |
250
251
| Queue |`Scheduled`| The job/run is scheduled for running, but it hasn't started yet. |
251
252
| Preparing |`Scheduled`| The job/run hasn't started yet, but a compute was allocated for its execution and it's preparing the environment and its inputs. |
## Gett metrics, parameters, artifacts, and models
265
+
## Getting metrics, parameters, artifacts, and models
265
266
266
267
The method `search_runs` returns a Pandas `Dataframe` that contains a limited amount of information by default. You can get Python objects if needed, which might be useful to get details about them. Use the `output_format` parameter to control how output is returned:
267
268
@@ -280,7 +281,7 @@ last_run = runs[-1]
280
281
print("Last run ID:", last_run.info.run_id)
281
282
```
282
283
283
-
### Get params and metrics from a run
284
+
### Getting params and metrics from a run
284
285
285
286
When runs are returned using `output_format="list"`, you can easily access parameters using the key `data`:
> In legacy versions of MLflow (<2.0), use the method `MlflowClient.download_artifacts()` instead.
323
324
324
-
### Get models from a run
325
+
### Getting models from a run
325
326
326
327
Models can also be logged in the run and then retrieved directly from it. To retrieve it, you need to know the artifact's path where it's stored. The method `list_artifacts` can be used to find artifacts that represent a model since MLflow models are always folders. You can download a model by indicating the path where the model is stored using the `download_artifact` method:
327
328
@@ -347,7 +348,7 @@ model = mlflow.xgboost.load_model(f"runs:/{last_run.info.run_id}/{artifact_path}
347
348
> [!TIP]
348
349
> To query and load models registered in the model registry, see [Manage models registries in Azure Machine Learning with MLflow](how-to-manage-models-mlflow.md).
349
350
350
-
## Get child (nested) runs
351
+
## Getting child (nested) runs
351
352
352
353
MLflow supports the concept of child (nested) runs. They're useful when you need to spin off training routines that must be tracked independently from the main training process. Hyper-parameter tuning optimization processes or Azure Machine Learning pipelines are typical examples of jobs that generate multiple child runs. You can query all the child runs of a specific run using the property tag `mlflow.parentRunId`, which contains the run ID of the parent run.
353
354
@@ -379,6 +380,7 @@ The [MLflow with Azure Machine Learning notebooks](https://github.com/Azure/azur
379
380
The MLflow SDK exposes several methods to retrieve runs, including options to control what is returned and how. Use the following table to learn about which of those methods are currently supported in MLflow when connected to Azure Machine Learning:
380
381
381
382
| Feature | Supported by MLflow | Supported by Azure Machine Learning |
383
+
| :-: | :-: | :-: |
382
384
| Ordering runs by attributes |**✓**|**✓**|
383
385
| Ordering runs by metrics |**✓**|<sup>1</sup>|
384
386
| Ordering runs by parameters |**✓**|<sup>1</sup>|
0 commit comments