Skip to content

Commit 5bcee6b

Browse files
committed
fix errors
1 parent 6d4539c commit 5bcee6b

File tree

1 file changed

+25
-22
lines changed

1 file changed

+25
-22
lines changed

articles/machine-learning/concept-azure-machine-learning-v2.md

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -38,29 +38,32 @@ This document provides a quick overview of these resources and assets.
3838

3939
### [Python SDK](#tab/sdk)
4040

41-
To use the Python SDK code examples in this article, create a connection to your Azure Machine Learning subscription. The examples all rely on `ml_client`.
42-
43-
```python
44-
# import required libraries
45-
from azure.ai.ml import MLClient
46-
from azure.ai.ml.entities import Workspace
47-
from azure.identity import DefaultAzureCredential
48-
49-
# Enter details of your subscription
50-
subscription_id = "<SUBSCRIPTION_ID>"
51-
resource_group = "<RESOURCE_GROUP>"
52-
53-
# get a handle to the subscription (use this if you haven't created a workspace yet)
54-
ml_client = MLClient(DefaultAzureCredential(), subscription_id, resource_group)
55-
56-
# for all examples after creating a workspace, also include the workspace name:
57-
workspace_name = "<WORKSPACE_NAME>"
58-
ml_client = ml_client = MLClient(DefaultAzureCredential(), subscription_id, resource_group, workspace_name)
59-
```
41+
To use the Python SDK code examples in this article:
42+
43+
1. Install the [Python SDK v2](https://aka.ms/sdk-v2-install)
44+
2. Create a connection to your Azure Machine Learning subscription. The examples all rely on `ml_client`. All examples also require `ml_client` to include the workpace name, other than the example that shows how to create a workspace.
45+
46+
```python
47+
# import required libraries
48+
from azure.ai.ml import MLClient
49+
from azure.ai.ml.entities import Workspace
50+
from azure.identity import DefaultAzureCredential
51+
52+
# Enter details of your subscription
53+
subscription_id = "<SUBSCRIPTION_ID>"
54+
resource_group = "<RESOURCE_GROUP>"
55+
56+
# get a handle to the subscription (use this if you haven't created a workspace yet)
57+
ml_client = MLClient(DefaultAzureCredential(), subscription_id, resource_group)
58+
59+
# other than when you create a workspace, be sure to include the workspace name in the connection
60+
workspace_name = "<WORKSPACE_NAME>"
61+
ml_client = ml_client = MLClient(DefaultAzureCredential(), subscription_id, resource_group, workspace_name)
62+
```
6063

6164
### [Azure CLI](#tab/cli)
6265

63-
To use the Azure CLI code examples in this article, you need to have the Azure CLI installed and configured. You can install the Azure CLI from the [Azure CLI documentation](/azure/install-azure-cli).
66+
To use the Azure CLI code examples in this article, you need to have the Azure CLI installed and configured. You can install the Azure CLI from the [Install and set up the CLI (v2)](how-to-configure-cli.md).
6467

6568
### [Studio](#tab/azure-studio)
6669

@@ -257,13 +260,13 @@ In custom environments, you're responsible for setting up your environment and i
257260

258261
### [Python SDK](#tab/sdk)
259262

260-
To create an environment using Python SDK v2, see [Create an envirnment](how-to-manage-environments-v2.md&tabs=python#create-an-environment).
263+
To create an environment using Python SDK v2, see [Create an envirnment](how-to-manage-environments-v2.md?tabs=python#create-an-environment).
261264

262265
This [Jupyter notebook](https://github.com/Azure/azureml-examples/blob/main/sdk/python/assets/environment/environment.ipynb) shows more ways to create custom environments using SDK v2.
263266

264267
### [Azure CLI](#tab/cli)
265268

266-
To create an environment using CLI v2, see [Create an envirnment](how-to-manage-environments-v2.md&tabs=cli#create-an-environment).
269+
To create an environment using CLI v2, see [Create an envirnment](how-to-manage-environments-v2.md?tabs=cli#create-an-environment).
267270

268271
For more information, see [environment YAML schema](reference-yaml-environment.md).
269272

0 commit comments

Comments
 (0)