Skip to content

Commit d456260

Browse files
authored
Fix missing MLClient parameter (workspace_name)
I added the `workspace_name=workspace_name` to the MLClient constructor. Without this parameter, the next example statement on line 72 `mlflow_tracking_uri = ml_client.workspaces.get(ml_client.workspace_name).mlflow_tracking_uri` fails with the error "ValidationException: Please provide a workspace name or use a MLClient with a workspace name set." By providing the workspace_name to the MLClient constructor the error is prevented.
1 parent 4269450 commit d456260

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

includes/machine-learning-mlflow-configure-tracking.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ ms.author: fasantia
5959
6060
ml_client = MLClient(credential=DefaultAzureCredential(),
6161
subscription_id=subscription_id,
62-
resource_group_name=resource_group)
62+
resource_group_name=resource_group,
63+
workspace_name=workspace_name)
6364
```
6465

6566
> [!IMPORTANT]
@@ -123,4 +124,4 @@ ms.author: fasantia
123124
---
124125

125126
> [!TIP]
126-
> When working on shared environments, like an Azure Databricks cluster, Azure Synapse Analytics cluster, or similar, it is useful to set the environment variable `MLFLOW_TRACKING_URI` at the cluster level to automatically configure the MLflow tracking URI to point to Azure Machine Learning for all the sessions running in the cluster rather than to do it on a per-session basis.
127+
> When working on shared environments, like an Azure Databricks cluster, Azure Synapse Analytics cluster, or similar, it is useful to set the environment variable `MLFLOW_TRACKING_URI` at the cluster level to automatically configure the MLflow tracking URI to point to Azure Machine Learning for all the sessions running in the cluster rather than to do it on a per-session basis.

0 commit comments

Comments
 (0)