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
You can get the Azure ML MLflow tracking URI using the [Azure Machine Learning SDK v2 for Python](concept-v2.md). Ensure you have the library `azure-ai-ml` installed in the compute you are using. The following sample gets the unique MLFLow tracking URI associated with your workspace.
83
-
84
-
1. Login into your workspace using the `MLClient`. The easier way to do that is by using the workspace config file:
You can get the Azure ML 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 are using. The following sample gets the unique MLFLow tracking URI associated with your workspace.
83
+
84
+
1. Login into your workspace using the `MLClient`. The easier way to do that is by using the workspace config file:
>`DefaultAzureCredential` will try to pull the credentials from the available context. If you want to specify credentials in a different way, forinstance using the web browserin an interactive way, you can use `InteractiveBrowserCredential` or any other method available in`azure.identity` package.
Use the Azure Machine Learning portal to get the tracking URI:
127
+
128
+
1. Open the [Azure Machine Learning studio portal](https://ml.azure.com) and log in using your credentials.
129
+
1. In the upper right corner, click on the name of your workspace to show the __Directory + Subscription + Workspace__ blade.
130
+
1. Click on __View all properties in Azure Portal__.
131
+
1. On the __Essentials__ section, you will find the property __MLflow tracking URI__.
132
+
133
+
# [Manually](#tab/manual)
134
+
135
+
The Azure Machine Learning Tracking URI can be constructed using the subscription ID, region of where the resource is deployed, resource group name and workspace name. The following code sample shows how:
136
+
137
+
> [!WARNING]
138
+
> If you are working in a private link-enabled workspace, the MLflow endpoint will also use a private link to communicate with Azure Machine Learning. As a consequence, the tracking URI will look different as proposed here. On those cases, you need to get the tracking URI using the Azure ML SDK or CLI v2.
>`DefaultAzureCredential` will try 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`orany other method available in`azure.identity` package.
117
-
118
-
1. Get the Azure Machine Learning Tracking URI:
149
+
1. Configuring the tracking URI:
119
150
151
+
# [Using an environment variable](#tab/environ)
152
+
153
+
You can set the MLflow environment variables [MLFLOW_TRACKING_URI](https://mlflow.org/docs/latest/tracking.html#logging-to-a-tracking-server) in your compute to make any interaction with MLflow in that compute to point by default to Azure Machine Learning.
154
+
155
+
```bash
156
+
MLFLOW_TRACKING_URI=$(az ml workspace show --query mlflow_tracking_uri | sed 's/"//g')
157
+
```
158
+
159
+
# [Using MLflow SDK](#tab/mlflow)
160
+
161
+
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.
Use the Azure Machine Learning portal to get the tracking URI:
127
-
128
-
1. Open the [Azure Machine Learning studio portal](https://ml.azure.com) and log in using your credentials.
129
-
1. In the upper right corner, click on the name of your workspace to show the __Directory + Subscription + Workspace__ blade.
130
-
1. Click on __View all properties in Azure Portal__.
131
-
1. On the __Essentials__ section, you will find the property __MLflow tracking URI__.
132
-
133
-
# [Manually](#tab/manual)
134
-
135
-
The Azure Machine Learning Tracking URI can be constructed using the subscription ID, region of where the resource is deployed, resource group name and workspace name. The following code sample shows how:
136
-
137
-
> [!WARNING]
138
-
> If you are working in a private link-enabled workspace, the MLflow endpoint will also use a private link to communicate with Azure Machine Learning. As a consequence, the tracking URI will look different as proposed here. On those cases, you need to get the tracking URI using the Azure MLSDKorCLI v2.
There are two main ways to configure your environment to work with Azure Machine Learning with Mlflow.
154
-
155
-
# [Using an environment variable](#tab/environ)
156
-
157
-
You can set the MLflow environment variables [MLFLOW_TRACKING_URI](https://mlflow.org/docs/latest/tracking.html#logging-to-a-tracking-server) in your compute to make any interaction with MLflow in that compute to point by default to Azure Machine Learning.
158
-
159
-
```bash
160
-
MLFLOW_TRACKING_URI=$(az ml workspace show --query mlflow_tracking_uri | sed 's/"//g')
161
-
```
162
-
163
-
# [Using MLflow SDK](#tab/mlflow)
164
-
165
-
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.
166
-
167
-
```python
168
-
import mlflow
169
-
170
-
mlflow.set_tracking_uri(mlflow_tracking_uri)
171
-
```
172
-
173
-
---
174
-
175
169
### Set experiment name
176
170
177
171
All MLflow runs are logged to the active experiment. By default, runs are logged to an experiment named `Default` that is automatically created for you. To configure the experiment you want to work on use MLflow command [`mlflow.set_experiment()`](https://mlflow.org/docs/latest/python_api/mlflow.html#mlflow.set_experiment).
0 commit comments