Skip to content

Commit adcf297

Browse files
authored
Merge pull request #89246 from nibaccam/adb-mlflo
MLflow | Azure Databricks integration part 2
2 parents 58ee5b8 + 8077b5e commit adcf297

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

articles/machine-learning/service/how-to-use-mlflow.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ms.service: machine-learning
99
ms.subservice: core
1010
ms.reviewer: nibaccam
1111
ms.topic: conceptual
12-
ms.date: 08/07/2019
12+
ms.date: 09/23/2019
1313
ms.custom: seodec18
1414
---
1515

@@ -141,6 +141,7 @@ MLflow Tracking with Azure Machine Learning lets you store the logged metrics an
141141
To run your Mlflow experiments with Azure Databricks, you need to first create an [Azure Databricks workspace and cluster](https://docs.microsoft.com/azure/azure-databricks/quickstart-create-databricks-workspace-portal)
142142

143143
In your cluster, be sure to install the *azureml-mlflow* library from PyPi, to ensure that your cluster has access to the necessary functions and classes.
144+
From here, import your experiment notebook, attach your cluster to it and run your experiment.
144145

145146
### Install libraries
146147

@@ -179,11 +180,18 @@ workspace_name = 'workspace_name'
179180
ws = Workspace.get(name=workspace_name,
180181
subscription_id=subscription_id,
181182
resource_group=resource_group)
182-
183183
```
184+
185+
#### Connect your Azure Databricks and Azure Machine Learning workspaces
186+
187+
On the [Azure portal](https://ms.portal.azure.com), you can link your Azure Databricks (ADB) workspace to a new or existing Azure Machine Learning workspace. To do so, navigate to your ADB workspace and select the **Link Azure Machine Learning workspace** button on the bottom right. Linking your workspaces enables you to track your experiment data in the Azure Machine Learning workspace.
188+
184189
### Link MLflow tracking to your workspace
190+
185191
After you instantiate your workspace, set the MLflow tracking URI. By doing so, you link the MLflow tracking to Azure Machine Learning workspace. After this, all your experiments will land in the managed Azure Machine Learning tracking service.
186192

193+
#### Directly set MLflow Tracking in your notebook
194+
187195
```python
188196
uri = ws.get_mlflow_tracking_uri()
189197
mlflow.set_tracking_uri(uri)
@@ -196,6 +204,12 @@ import mlflow
196204
mlflow.log_metric('epoch_loss', loss.item())
197205
```
198206

207+
#### Automate setting MLflow Tracking
208+
209+
Instead of manually setting the tracking URI in every subsequent experiment notebook session on your clusters, do so automatically using this [Azure Machine Learning Tracking Cluster Init script](https://github.com/Azure/MachineLearningNotebooks/blob/3ce779063b000e0670bdd1acc6bc3a4ee707ec13/how-to-use-azureml/azure-databricks/linking/README.md).
210+
211+
When configured correctly, you are able to see your MLflow tracking data in Azure Machine Learning's REST API and all clients, and in Azure Databricks via the MLflow user interface or by using the MLflow client.
212+
199213
## View metrics and artifacts in your workspace
200214

201215
The metrics and artifacts from MLflow logging are kept in your workspace. To view them anytime, navigate to your workspace and find the experiment by name on the [Azure portal](https://portal.azure.com) or in your [workspace landing page (preview)](https://ml.azure.com). Or run the below code.

0 commit comments

Comments
 (0)