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
- An [Azure Machine Learning Workspace](quickstart-create-resources.md).
34
34
35
-
See which [access permissions you need to perform your MLflow operations with your workspace](how-to-assign-roles.md#mlflow-operations).
35
+
See which [access permissions](how-to-assign-roles.md#mlflow-operations) you need to perform your MLflow operations with your workspace.
36
36
37
37
### Example notebooks
38
38
@@ -75,12 +75,12 @@ To link your Azure Databricks workspace to a new or existing Azure Machine Learn
75
75
76
76
:::image type="content" source="./media/how-to-use-mlflow-azure-databricks/link-workspaces.png" lightbox="./media/how-to-use-mlflow-azure-databricks/link-workspaces.png" alt-text="Screenshot shows the Link Azure Databricks and Azure Machine Learning workspaces option.":::
77
77
78
-
After you link your Azure Databricks workspace with your Azure Machine Learning workspace, MLflow Tracking is automatically tracked in the following places:
78
+
After you link your Azure Databricks workspace with your Azure Machine Learning workspace, MLflow tracking is automatically tracked in the following places:
79
79
80
80
- The linked Azure Machine Learning workspace.
81
81
- Your original Azure Databricks workspace.
82
82
83
-
You can use then MLflow in Azure Databricks in the same way that you're used to. The following example sets the experiment name as usual in Azure Databricks and start logging some parameters:
83
+
You can use then MLflow in Azure Databricks in the same way that you're used to. The following example sets the experiment name as usual in Azure Databricks and start logging some parameters.
84
84
85
85
```python
86
86
import mlflow
@@ -107,20 +107,20 @@ Configure the MLflow tracking URI to point exclusively to Azure Machine Learning
You can get the Azure Machine Learning MLflow tracking URI using the [Azure Machine Learning SDK v2 forPython](concept-v2.md). Ensure you have the library `azure-ai-ml` installedin the compute you're using. The following sample gets the unique MLFLow tracking URI associated with your workspace.
133
+
You can get the Azure Machine Learning MLflow tracking URI using the [Azure Machine Learning SDK v2 forPython](concept-v2.md). Ensure you have the library `azure-ai-ml` installedin the compute that you're using. The following sample gets the unique MLFLow tracking URI associated with your workspace.
134
134
135
-
1. Sign in into your workspace using the `MLClient`. The easier way to do that is by using the workspace config file:
135
+
1. Sign in into your workspace using the `MLClient`. The easier way to do that is by using the workspace config file.
136
136
137
137
```python
138
138
from azure.ai.ml import MLClient
@@ -148,7 +148,7 @@ Configure the MLflow tracking URI to point exclusively to Azure Machine Learning
148
148
> 1. Select the upper-right corner of the page > **Download config file**.
149
149
> 1. Save the file `config.json` in the same directory where you are working.
150
150
151
-
Alternatively, you can use the subscription ID, resource group name, and workspace name to get it:
151
+
Alternatively, you can use the subscription ID, resource group name, and workspace name to get it.
152
152
153
153
```python
154
154
from azure.ai.ml import MLClient
@@ -167,15 +167,15 @@ Configure the MLflow tracking URI to point exclusively to Azure Machine Learning
167
167
> [!IMPORTANT]
168
168
> `DefaultAzureCredential` tries to pull the credentials from the available context. If you want to specify credentials in a different way, for instance using the web browser in an interactive way, you can use `InteractiveBrowserCredential` or any other method available in [`azure.identity`](https://pypi.org/project/azure-identity/) package.
Use the Azure Machine Learning portal to get the tracking URI:
178
+
Use the Azure Machine Learning portal to get the tracking URI.
179
179
180
180
1. Open the [Azure Machine Learning studio portal](https://ml.azure.com) and sign in using your credentials.
181
181
1. Select the name of your workspace to show the **Directory + Subscription + Workspace** page.
@@ -184,7 +184,7 @@ Configure the MLflow tracking URI to point exclusively to Azure Machine Learning
184
184
185
185
# [Manually](#tab/manual)
186
186
187
-
You can construct the Azure Machine Learning Tracking URI using the subscription ID, region of where the resource is deployed, resource group name, and workspace name. The following code sample shows how:
187
+
You can construct the Azure Machine Learning Tracking URI using the subscription ID, region of where the resource is deployed, resource group name, and workspace name. The following code sample shows how.
188
188
189
189
> [!WARNING]
190
190
> If you're working in a private link-enabled workspace, the MLflow endpoint also uses a private link to communicate with Azure Machine Learning. Consequently, the tracking URI looks different than shown here. You need to get the tracking URI using the Azure Machine Learning SDK or CLI v2 on those cases.
@@ -198,11 +198,11 @@ Configure the MLflow tracking URI to point exclusively to Azure Machine Learning
Then the method [`set_tracking_uri()`](https://mlflow.org/docs/latest/python_api/mlflow.html#mlflow.set_tracking_uri) points the MLflow tracking URI to that URI.
205
+
The method [`set_tracking_uri()`](https://mlflow.org/docs/latest/python_api/mlflow.html#mlflow.set_tracking_uri) points the MLflow tracking URI to that URI.
206
206
207
207
```python
208
208
import mlflow
@@ -235,7 +235,7 @@ After you configure tracking, configure how to authenticate to the associated wo
235
235
236
236
#### Experiment names in Azure Machine Learning
237
237
238
-
When you configure MLflow to exclusively track experiments in Azure Machine Learning workspace, the experiment naming convention has to follow the one used by Azure Machine Learning. In Azure Databricks, experiments are named with the path to where the experiment is saved, forinstance `/Users/[email protected]/iris-classifier`. However,in Azure Machine Learning, you provide the experiment name directly. The same experiment would be named `iris-classifier` directly:
238
+
When you configure MLflow to exclusively track experiments in Azure Machine Learning workspace, the experiment naming convention has to follow the one used by Azure Machine Learning. In Azure Databricks, experiments are named with the path to where the experiment is saved, forinstance `/Users/[email protected]/iris-classifier`. However,in Azure Machine Learning, you provide the experiment name directly. The same experiment would be named `iris-classifier` directly.
@@ -249,7 +249,7 @@ After this configuration, you can use MLflow in Azure Databricks in the same way
249
249
250
250
After your model is trained, you can log it to the tracking server with the `mlflow.<model_flavor>.log_model()` method. `<model_flavor>` refers to the framework associated with the model. [Learn what model flavors are supported](https://mlflow.org/docs/latest/models.html#model-api).
251
251
252
-
In the following example, a model created with the Spark library MLLib is being registered:
252
+
In the following example, a model created with the Spark library MLLib is being registered.
@@ -264,9 +264,9 @@ Models are logged inside of the run being tracked. That fact means that models a
264
264
265
265
## Registering models in the registry with MLflow
266
266
267
-
As opposite to tracking, model registries can't operate at the same timein Azure Databricks and Azure Machine Learning. They have to use either one or the other. By default, model registries use the Azure Databricks workspace. If you choose to [set MLflow Tracking to only track in your Azure Machine Learning workspace](#tracking-exclusively-on-azure-machine-learning-workspace), the model registry is the Azure Machine Learning workspace.
267
+
As opposed to tracking, model registries can't operate at the same timein Azure Databricks and Azure Machine Learning. They have to use either one or the other. By default, model registries use the Azure Databricks workspace. If you choose to [set MLflow tracking to only track in your Azure Machine Learning workspace](#tracking-exclusively-on-azure-machine-learning-workspace), the model registry is the Azure Machine Learning workspace.
268
268
269
-
If you use the default configuration, the following code logs a model inside the corresponding runs of both Azure Databricks and Azure Machine Learning, but it registers it only on Azure Databricks:
269
+
If you use the default configuration, the following code logs a model inside the corresponding runs of both Azure Databricks and Azure Machine Learning, but it registers it only on Azure Databricks.
### Using Azure Machine Learning Registry with MLflow
280
280
281
-
If you want to use Azure Machine Learning Model Registry instead of Azure Databricks, we recommend that you [set MLflow Tracking to only track in your Azure Machine Learning workspace](#tracking-exclusively-on-azure-machine-learning-workspace). This approach removes the ambiguity of where models are being registered and simplifies the configuration.
281
+
If you want to use Azure Machine Learning Model Registry instead of Azure Databricks, we recommend that you [set MLflow tracking to only track in your Azure Machine Learning workspace](#tracking-exclusively-on-azure-machine-learning-workspace). This approach removes the ambiguity of where models are being registered and simplifies the configuration.
282
282
283
283
If you want to continue using the dual-tracking capabilities but register models in Azure Machine Learning, you can instruct MLflow to use Azure Machine Learning for model registries by configuring the MLflow Model Registry URI. This URI has the same format and value that the MLflow that tracks URI.
> The value of `azureml_mlflow_uri` was obtained in the same way as described in [Set MLflow Tracking to only track in your Azure Machine Learning workspace](#tracking-exclusively-on-azure-machine-learning-workspace).
290
+
> The value of `azureml_mlflow_uri` was obtained in the same way as described in [Set MLflow tracking to only track in your Azure Machine Learning workspace](#tracking-exclusively-on-azure-machine-learning-workspace).
291
291
292
292
For a complete example of this scenario, see [Training models in Azure Databricks and deploying them on Azure Machine Learning](https://github.com/Azure/azureml-examples/blob/main/sdk/python/using-mlflow/deploy/track_with_databricks_deploy_aml.ipynb).
For more ways to reference models from the registry, see [Loading models from registry](how-to-manage-models-mlflow.md#loading-models-from-registry).
328
328
329
-
After the model is loaded, you can use to score new data:
329
+
After the model is loaded, you can use this command to score new data.
330
330
331
331
```python
332
332
#Load Scoring Data into Spark Dataframe
@@ -344,7 +344,7 @@ display(preds)
344
344
345
345
If you want to keep your Azure Databricks workspace, but no longer need the Azure Machine Learning workspace, you can delete the Azure Machine Learning workspace. This action results in unlinking your Azure Databricks workspace and the Azure Machine Learning workspace.
346
346
347
-
If you don't plan to use the logged metrics and artifacts in your workspace, delete the resource group that contains the storage account and workspace:
347
+
If you don't plan to use the logged metrics and artifacts in your workspace, delete the resource group that contains the storage account and workspace.
348
348
349
349
1. In the Azure portal, search for*Resource groups*. Under **services**, select**Resource groups**.
350
350
1. In the **Resource groups** list, find and selectthe resource group that you created to open it.
0 commit comments