---
title: Organize training runs with MLflow experiments
description: Learn how to create and manage MLflow experiments to organize agent traces, LLM application evaluations, and ML model training runs.
canonical_url: https://docs.databricks.com/aws/en/mlflow/experiments
---

# Organize training runs with MLflow experiments

Experiments are units of organization for your MLflow runs, including agent traces, LLM application evaluations, and [model training runs](https://docs.databricks.com/aws/en/mlflow/runs.md). There are two types of experiments: workspace and notebook.

* You can create a workspace experiment from the Databricks UI or the MLflow API. Workspace experiments are not associated with any notebook, and any notebook can log a run to these experiments by using the experiment ID or the experiment name.
* A notebook experiment is associated with a specific notebook. Databricks automatically creates a notebook experiment if there is no active experiment when you start a run using [mlflow.start\_run()](https://mlflow.org/docs/latest/python_api/mlflow.html#mlflow.start_run).

To see all of the experiments in a workspace that you have access to, in the sidebar, under **AI/ML**, click **Experiments**.

![Experiments page](https://docs.databricks.com/aws/en/images/machine-learning/experiments-page.png)

## <a id="workspace-expt" />Create workspace experiment

This section describes how to create a workspace experiment using the Databricks UI. You can create a workspace experiment directly [from the workspace](https://docs.databricks.com/aws/en/mlflow/experiments.md#create-expt-from-workspace) or [from the Experiments page](https://docs.databricks.com/aws/en/mlflow/experiments.md#create-expt-from-expts-page).

You can also use the [MLflow API](https://mlflow.org/docs/latest/index.html), or the [Databricks Terraform provider](https://docs.databricks.com/aws/en/dev-tools/terraform/index.md) with [databricks\_mlflow\_experiment](https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/mlflow_experiment).

For instructions on logging runs to workspace experiments, see [Log runs and models to an experiment](https://docs.databricks.com/aws/en/mlflow/tracking.md#mlflow-recording-runs).

> [!NOTE]
>
> For GDPR compliance, stale experiments are purged from workspaces. For workspaces where [customer-managed keys](https://docs.databricks.com/aws/en/security/keys/customer-managed-keys.md) are used, the stale experiments are only purged when the customer-managed key is accessible by Databricks. See [Configure customer-managed keys for encryption](https://docs.databricks.com/aws/en/security/keys/configure-customer-managed-keys.md) to give access.

### <a id="create-expt-from-workspace" />Create experiment from the workspace

1. Click ![Workspace Icon](https://docs.databricks.com/aws/en/images/icons/workspace-icon.png) **Workspace** in the sidebar.

2. Navigate to the folder in which you want to create the experiment.

3. Right-click on the folder and select **Create > MLflow experiment**.

4. In the Create MLflow Experiment dialog, enter a name for the experiment and an optional artifact location. If you do not specify an artifact location, artifacts are stored in MLflow-managed artifact storage: `dbfs:/databricks/mlflow-tracking/<experiment-id>`.

   For workspaces enabled for Unity Catalog, you can also store artifacts in a Unity Catalog volume. To store artifacts in your own cloud storage, create a Unity Catalog external volume.

   To store artifacts in a Unity Catalog volume, specify a volume path of the form `dbfs:/Volumes/catalog_name/schema_name/volume_name/user/specified/path` as your MLflow experiment artifact location, either in the UI or as shown in the following code:

   ```python
   import mlflow # Storing artifacts in a volume requires MLflow 2.15.0 or above

   EXP_NAME = "/Users/first.last@databricks.com/my_experiment_name"
   CATALOG = "my_catalog"
   SCHEMA = "my_schema"
   VOLUME = "my_volume"
   ARTIFACT_PATH = f"dbfs:/Volumes/{CATALOG}/{SCHEMA}/{VOLUME}" # can be a managed or external volume

   mlflow.set_tracking_uri("databricks")
   mlflow.set_registry_uri("databricks-uc")

   if mlflow.get_experiment_by_name(EXP_NAME) is None:
       mlflow.create_experiment(name=EXP_NAME, artifact_location=ARTIFACT_PATH)
   mlflow.set_experiment(EXP_NAME)
   ```

   If your workspace is not enabled for Unity Catalog, or you do not have access to MLflow 2.15.0 or above, specify a path in this format: `dbfs:/path/to/artifacts`.

   Databricks recommends using a Unity Catalog volume for artifact storage. If neither a Unity Catalog volume nor DBFS is a suitable option, you can also store artifacts directly to S3 (not recommended). To store artifacts in S3, specify a URI of the form `s3://<bucket>/<path>`. MLflow obtains credentials to access S3 from your cluster's [instance profile](https://docs.databricks.com/aws/en/archive/storage/tutorial-s3-instance-profile.md). Artifacts stored in S3 do not appear in the MLflow UI; you must download them using an object storage client.

   The upload and download file size limits are both 5GB.

   > [!NOTE]
   >
   > When you store an artifact in a location other than MLflow-managed DBFS (default) or Unity Catalog volumes, the artifact does not appear in the MLflow UI. Models stored in locations other than these cannot be registered in Model Registry.

5. Click **Create**. The experiment details page for the new experiment appears.

6. To log runs to this experiment, call `mlflow.set_experiment()` with the experiment path. To display the experiment path, click the information icon ![information icon](https://docs.databricks.com/aws/en/images/mlflow/info-icon.png) to the right of the experiment name. See [Log runs and models to an experiment](https://docs.databricks.com/aws/en/mlflow/tracking.md#mlflow-recording-runs) for details and an example notebook.

### <a id="create-expt-from-expts-page" />Create experiment from the Experiments page

To create a foundation model fine-tuning, AutoML, or custom experiment, click **Experiments** or select **New > Experiment** in the left sidebar.

At the top of the page, select one of the following options to configure an experiment:

* **Foundation Model Fine-tuning**. The **Foundation Model Fine-tuning** dialog appears. For details, see [Create a training run using the Foundation Model Fine-tuning UI (EoL)](https://docs.databricks.com/aws/en/large-language-models/foundation-model-training/ui.md).
* **Forecasting**. The **Configure Forecasting experiment** dialog appears. For details, see [Configure the AutoML experiment](https://docs.databricks.com/aws/en/machine-learning/automl/forecasting.md#configure).
* **Classification**. The **Configure Classification experiment** dialog appears. For details, see [Set up classification experiment with the UI](https://docs.databricks.com/aws/en/machine-learning/automl/classification.md#setup).
* **Regression**. The **Configure Classification experiment** dialog appears. For details, see [Set up regression experiment with the UI](https://docs.databricks.com/aws/en/machine-learning/automl/regression.md#setup).
* **Custom**. The **Create MLflow Experiment** dialog appears. For details, see Step 4 in [Create experiment from the workspace](https://docs.databricks.com/aws/en/mlflow/experiments.md#create-expt-from-workspace).

## <a id="mlflow-notebook-experiments" />Create notebook experiment

When you use the [mlflow.start\_run() command](https://mlflow.org/docs/latest/python_api/mlflow.html#mlflow.start_run) in a notebook, the run logs metrics and parameters to the active experiment. If no experiment is active, Databricks creates a notebook experiment. A notebook experiment shares the same name and ID as its corresponding notebook. The notebook ID is the numerical identifier at the end of a [Notebook URL and ID](https://docs.databricks.com/aws/en/workspace/workspace-details.md#workspace-notebook-url).

> [!WARNING]
>
> Don't rely on automatically created notebook experiments in jobs that run notebooks from a [remote Git repository](https://docs.databricks.com/aws/en/jobs/git.md). The job uses a temporary copy of the notebook, so the experiment and its runs can become inaccessible a few days after the job completes. Before you start any runs, call `mlflow.set_experiment()` with the path to a workspace experiment outside a Git folder. See [Prevent data loss in MLflow experiments](https://docs.databricks.com/aws/en/repos/limits.md#repos-mlflow-data-loss).

> [!NOTE]
>
> Users running MLflow on compute with [dedicated group access](https://docs.databricks.com/aws/en/compute/group-access.md) must verify the group has permission to write to the directory where the notebook lives, or use `mlflow.set_tracking_uri("<path>")` to specify a folder for MLflow to write to.

Alternatively, you can pass a Databricks workspace path to an existing notebook in [mlflow.set\_experiment()](https://www.mlflow.org/docs/latest/python_api/mlflow.html?highlight=set_experiment#mlflow.set_experiment) to create a notebook experiment for it.

For instructions on logging runs to notebook experiments, see [Log runs and models to an experiment](https://docs.databricks.com/aws/en/mlflow/tracking.md#mlflow-recording-runs).

> [!NOTE]
>
> If you delete a notebook experiment using the API (for example, `MlflowClient.tracking.delete_experiment()` in Python), the notebook itself is moved into the Trash folder.

## <a id="experiment-page" />View experiments

Each experiment that you have access to appears on the experiments page. From this page, you can view any experiment. Click on an experiment name to display the experiment details page.

Additional ways to access the experiment details page:

* You can access the experiment details page for a workspace experiment from the workspace menu.
* You can access the experiment details page for a notebook experiment from the notebook.

To search for experiments, type text in the **Filter experiments** field and press **Enter** or click the magnifying glass icon. The experiment list changes to show only those experiments that contain the search text in the **Name** or **Location** columns.

For advanced usage, you can enter a search query for `` tags.`mlflow.note.content` `` to search based on the **Description** column. For further details on syntax, see [Search Experiments](https://mlflow.org/docs/latest/ml/search/search-experiments/). Please note that unlike searching for **Name** or **Location**, searching through tags requires you to manually construct the search query with an identifier and comparator. It will not directly return all results that contain the search text.

Click the name of any experiment in the table to display its experiment details page:

![View experiment](https://docs.databricks.com/aws/en/images/mlflow/quick-start-nb-experiment.png)

The experiment details page lists all runs associated with the experiment. From the table, you can open the run page for any run associated with the experiment by clicking its **Run Name**. The **Source** column gives you access to the notebook version that created the run. You can also search and [filter](https://docs.databricks.com/aws/en/mlflow/runs.md#filter-runs) runs by metrics or parameter settings.

### <a id="view-workspace-experiment" />View workspace experiment

1. Click ![Workspace Icon](https://docs.databricks.com/aws/en/images/icons/workspace-icon.png) **Workspace** in the sidebar.
2. Go to the folder containing the experiment.
3. Click the experiment name.

### <a id="view-notebook-experiment" />View notebook experiment

In the notebook's right sidebar, click the **Experiment** icon ![Experiment icon](https://docs.databricks.com/aws/en/images/icons/experiment.png).

The Experiment Runs sidebar appears and shows a summary of each run associated with the notebook experiment, including run parameters and metrics. At the top of the sidebar is the name of the experiment that the notebook most recently logged runs to (either a notebook experiment or a workspace experiment).

![View run parameters and metrics](https://docs.databricks.com/aws/en/images/mlflow/mlflow-notebook-revision.png)

From the sidebar, you can navigate to the experiment details page or directly to a run.

* To view the experiment, click ![External Link](https://docs.databricks.com/aws/en/images/icons/external-link.png) at the far right, next to **Experiment Runs**.
* To display a [run](https://docs.databricks.com/aws/en/mlflow/runs.md), click the name of the run.

## Manage experiments

You can rename, delete, or manage permissions for an experiment you own from the experiments page, the [experiment details page](https://docs.databricks.com/aws/en/mlflow/experiments.md#experiment-page), or the workspace menu.

> [!NOTE]
>
> You cannot directly rename, delete, or manage permissions on an MLflow experiment that was created by a notebook in a Databricks Git folder. You must perform these actions at the Git folder level.

### Rename experiment

You can rename an experiment that you own from the [**Experiments** page](https://docs.databricks.com/aws/en/mlflow/experiments.md#experiment-page) or from the experiment details page for that experiment.

* On the **Experiments** page, click the kebab menu ![Kebab menu icon.](https://docs.databricks.com/aws/en/images/product-icons/OverflowIcon.svg) in the rightmost column and then click **Rename**.

![Rename from the Experiments page.](https://docs.databricks.com/aws/en/images/access-control/expts-page-change-permission.png)

* On the experiment details page, click the kebab menu ![Kebab menu icon.](https://docs.databricks.com/aws/en/images/product-icons/OverflowIcon.svg) next to **Permissions** and then click **Rename**.

![Rename from the experiment details page.](https://docs.databricks.com/aws/en/images/access-control/expt-page-kebab.png)

You can rename a workspace experiment from the workspace. Right-click the experiment name and then click **Rename**.

### <a id="copy-experiment-name" />Get experiment ID and path to experiment

On the experiment details page, you can get the path to a notebook experiment by clicking the information icon ![information icon](https://docs.databricks.com/aws/en/images/mlflow/info-icon.png) to the right of the experiment name. A pop-up note appears that shows the path to the experiment, the experiment ID, and the artifact location. You can use the experiment ID in the MLflow command `set_experiment` to set the active MLflow experiment.

![Experiment name icon](https://docs.databricks.com/aws/en/images/mlflow/get-experiment-path.png)

From a notebook, you can copy the full path of the experiment by clicking ![Path icon.](https://docs.databricks.com/aws/en/images/mlflow/path-icon.png) in the notebook's experiment sidebar.

![Experiment path icon in notebook sidebar.](https://docs.databricks.com/aws/en/images/mlflow/get-experiment-name.png)

### Delete notebook experiment

Notebook experiments are part of the notebook and cannot be deleted separately. When you [delete a notebook](https://docs.databricks.com/aws/en/notebooks/notebooks-manage.md#delete-a-notebook), the associated notebook experiment is deleted. When you delete a notebook experiment using the UI, the notebook is also deleted.

To delete notebook experiments using the API, use the [Workspace API](https://docs.databricks.com/api/workspace/introduction) to ensure both the notebook and experiment are deleted from the workspace.

### Delete a workspace or notebook experiment

You can delete an experiment that you own from the [experiments page](https://docs.databricks.com/aws/en/mlflow/experiments.md#experiment-page) or from the experiment details page.

> [!IMPORTANT]
>
> When you delete a notebook experiment, the notebook is also deleted.

* On the **Experiments** page, click the kebab menu ![Kebab menu icon.](https://docs.databricks.com/aws/en/images/product-icons/OverflowIcon.svg) in the rightmost column and then click **Delete**.

![Delete from experiments page.](https://docs.databricks.com/aws/en/images/access-control/expts-page-change-permission.png)

* On the experiment details page, click the kebab menu ![Kebab menu icon.](https://docs.databricks.com/aws/en/images/product-icons/OverflowIcon.svg) next to **Permissions** and then click **Delete**.

![Delete from experiment details page.](https://docs.databricks.com/aws/en/images/access-control/expt-page-kebab.png)

You can delete a workspace experiment from the workspace. Right-click the experiment name and then click **Move to Trash**.

### <a id="change-permissions" />Change permissions for an experiment

To change permissions for an experiment from the [experiment details page](https://docs.databricks.com/aws/en/mlflow/experiments.md#experiment-page), click **Permissions**.

![Experiment details page permissions menu](https://docs.databricks.com/aws/en/images/access-control/expt-permission.png)

You can change permissions for an experiment that you own from the [**Experiments** page](https://docs.databricks.com/aws/en/mlflow/experiments.md#experiment-page). Click the kebab menu ![Kebab menu icon.](https://docs.databricks.com/aws/en/images/product-icons/OverflowIcon.svg) in the rightmost column and then click **Permissions**.

![Change permissions from the Experiments page.](https://docs.databricks.com/aws/en/images/access-control/expts-page-change-permission.png)

For information on experiment permission levels, see [MLflow experiment ACLs](https://docs.databricks.com/aws/en/security/auth/access-control/index.md#experiments).

## Copy experiments between workspaces

To migrate MLflow experiments between workspaces, you can use the community-driven open source project [MLflow Export-Import](https://github.com/mlflow/mlflow-export-import#why-use-mlflow-export-import).

With these tools, you can:

* Share and collaborate with other data scientists in the same or another tracking server. For example, you can clone an experiment from another user into your workspace.
* Copy MLflow experiments and runs from your local tracking server to your Databricks workspace.
* Back up mission critical experiments and models to another Databricks workspace.
