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
Use MLflow to search for experiments inside of your workspace.
38
+
35
39
## Getting all the experiments
36
40
37
-
You can get all the active experiments in the workspace using MLFlow:
41
+
You can get all the active experiments in the workspace using MLflow:
38
42
39
43
```python
40
44
experiments = mlflow.search_experiments()
@@ -43,9 +47,9 @@ for exp in experiments:
43
47
```
44
48
45
49
> [!NOTE]
46
-
> __MLflow 2.0 advisory:__In legacy versions of MLflow (<2.0) use method `list_experiments` instead.
50
+
> In legacy versions of MLflow (<2.0) use method `mlflow.list_experiments()` instead.
47
51
48
-
If you want to retrieve archived experiments too, then include the option `ViewType.ALL` in the `view_type` argument. The following sample shows how:
52
+
If you want to retrieve archived experiments too, then include the parameter `view_type=ViewType.ALL`. The following sample shows how:
49
53
50
54
```python
51
55
from mlflow.entities import ViewType
@@ -55,26 +59,26 @@ for exp in experiments:
55
59
print(exp.name)
56
60
```
57
61
58
-
##Search experiments
62
+
### Getting a specific experiment
59
63
60
-
The `search_experiments()` method available since Mlflow 2.0 allows searching experiment matching a criteria using `filter_string`. The following query retrieves three experiments with different IDs.
64
+
Details about a specific experiment can be retrieved using the `get_experiment_by_name` method:
61
65
62
66
```python
63
-
mlflow.search_experiments(filter_string="experiment_id IN (
Details about a specific experiment can be retrieved using the `get_experiment_by_name` method:
73
+
The `search_experiments()` method available since Mlflow 2.0 allows searching experiment matching a criteria using `filter_string`. The following query retrieves three experiments with different IDs.
MLflow allows searching runs inside of any experiment, including multiple experiments at the same time. By default, MLflow returns the data in Pandas `Dataframe` format, which makes it handy when doing further processing our analysis of the runs. Returned data includes columns with:
80
84
@@ -131,13 +135,13 @@ You can also look for a run with a specific combination in the hyperparameters u
Specific run field can also be indicated. Fields do not need a qualifier like `params`, `metrics`or `attributes`. The following search query for runs with specific IDs.
140
+
You can also use the qualifier `attributes` to query for specific attributes of the run like `creation_time`or `run_id`. The following example conditions the query to return only specific runs:
The method `search_runs` require you to indicate the experiment name or ID you want to search runs in. However, if you want to query runs across multiple experiments, you can indicate the argument `search_all_experiments=True` to expand the search.
Notice that if `search_all_experiments` is not indicated and no experiment ID or name is indicated, the search is performed in the current active experiment (the one indicated in `mlflow.set_experiment()` method).
166
180
167
181
## Getting metrics, parameters, artifacts and models
0 commit comments