Skip to content

Commit 14b27ad

Browse files
committed
some edits
1 parent 97ddf1b commit 14b27ad

File tree

3 files changed

+55
-49
lines changed

3 files changed

+55
-49
lines changed

articles/machine-learning/how-to-manage-workspace-cli.md

Lines changed: 50 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -23,37 +23,40 @@ You can also use the following methods to create and manage Azure Machine Learni
2323

2424
- [Azure Machine Learning studio](quickstart-create-resources.md#create-the-workspace)
2525
- [Azure portal or Python SDK](how-to-manage-workspace.md)
26+
- [Python SDK](how-to-manage-workspace.md)
2627
- [Azure PowerShell](how-to-manage-workspace-powershell.md)
2728
- [Visual Studio Code with the Azure Machine Learning extension](how-to-setup-vs-code.md)
2829

2930
## Prerequisites
3031

3132
- An Azure subscription with a free or paid version of Azure Machine Learning. If you don't have an Azure subscription, [create a free account before you begin](https://azure.microsoft.com/free/).
32-
- If you want to run the Azure CLI commands in this article locally, you need [Azure CLI](/cli/azure/install-azure-cli) v. 2.38.0 or greater, with the V2 `ml` extension installed by running `az extension add -n ml`.
33+
- If you want to run the Azure CLI commands in this article locally, you need [Azure CLI](/cli/azure/install-azure-cli) v. 2.38.0 or greater installed.
3334

34-
If you use [Azure Cloud Shell](https://azure.microsoft.com//features/cloud-shell/), you don't need to install anything. The browser accesses the latest cloud version of Azure CLI and extensions.
35+
If you use [Azure Cloud Shell](https://azure.microsoft.com//features/cloud-shell/), you don't need to install anything. The browser accesses the latest cloud version of Azure CLI and the Azure Machine Learning extension.
3536

3637
## Limitations
3738

3839
[!INCLUDE [register-namespace](includes/machine-learning-register-namespace.md)]
3940

40-
[!INCLUDE [application-insight](includes/machine-learning-application-insight.md)]
41+
- The following limitation applies to the Application Insights instance that's created during workspace creation:
42+
43+
[!INCLUDE [application-insight](includes/machine-learning-application-insight.md)]
4144

4245
## Connect to your Azure subscription
4346

4447
If you use Azure Cloud Shell from the Azure portal, you can skip this section. The cloud shell automatically authenticates you using the Azure subscription you're signed in with.
4548

46-
[!INCLUDE [select-subscription](includes/machine-learning-cli-subscription.md)]
47-
4849
There are several ways to authenticate locally to your Azure subscription from Azure CLI. The simplest way is by using a browser.
4950

50-
To authenticate interactively, open a command line or terminal and run `az login`. If the CLI can open your default browser, it will do so and load a sign-in page. Otherwise, follow the command-line instructions to open a browser to [https://aka.ms/devicelogin](https://aka.ms/devicelogin) and enter an device authorization code.
51+
To authenticate interactively, open a command line or terminal and run `az login`. If the CLI can open your default browser, it does so, and loads a sign-in page. Otherwise, follow the command-line instructions to open a browser to [https://aka.ms/devicelogin](https://aka.ms/devicelogin) and enter a device authorization code.
52+
53+
[!INCLUDE [select-subscription](includes/machine-learning-cli-subscription.md)]
5154

5255
For other methods of authenticating, see [Sign in with Azure CLI](/cli/azure/authenticate-azure-cli).
5356

5457
## Create a resource group
5558

56-
The Azure Machine Learning workspace must be created inside an existing or new resource group. To create a new resource group, run the following command. Replace `<resource-group-name>` with the name and `<location>` with the Azure region to use for this resource group.
59+
The Azure Machine Learning workspace must be created inside an existing or new resource group. To create a new resource group, run the following command. Replace `<resource-group-name>` with the name and `<location>` with the Azure region you want to use for this resource group.
5760

5861
> [!NOTE]
5962
> Make sure to select a region where Azure Machine Learning is available. For information, see [Products available by region](https://azure.microsoft.com/global-infrastructure/services/?products=machine-learning-service).
@@ -82,15 +85,15 @@ For more information on working with resource groups, see [az group](/cli/azure/
8285

8386
## Create a workspace
8487

85-
An Azure Machine Learning workspace requires various other services deployed as [dependent associated resources](./concept-workspace.md#associated-resources). When you use Azure CLI to create a workspace, the CLI can create the new associated resources or you can attach existing resources.
88+
A deployed Azure Machine Learning workspace requires various other services as [dependent associated resources](./concept-workspace.md#associated-resources). When you use Azure CLI to create a workspace, the CLI can create the new associated resources or you can attach existing resources.
8689

8790
To create a new workspace with new automatically created dependent services, run the following command:
8891

8992
```azurecli-interactive
9093
az ml workspace create -n <workspace-name> -g <resource-group-name>
9194
```
9295

93-
To create a new workspace that uses existing associated resources, you first define the resources in a [YAML configuration file](#use-existing-resources). Then you reference the YAML file in the Azure CLI workspace creation command as follows:
96+
To create a new workspace that uses existing associated resources, you first define the resources in a YAML configuration file, as described in the following section. Then you reference the YAML file in the Azure CLI workspace creation command as follows:
9497

9598
```azurecli-interactive
9699
az ml workspace create -g <resource-group-name> --file <configuration-file>.yml
@@ -119,19 +122,19 @@ The output of the workspace creation command is similar to the following JSON. Y
119122
}
120123
```
121124

122-
### Use existing resources
125+
### YAML configuration file
123126

124127
To use existing resources for a new workspace, you create a YAML configuration file that defines the resources. The following YAML code shows an example workspace configuration file:
125128

126129
:::code language="YAML" source="~/azureml-examples-main/cli/resources/workspace/with-existing-resources.yml":::
127130

128-
You don't have to specify all the associated resources in the configuration file. You can specify one or more of the resources, and the others are automatically created.
131+
You don't have to specify all the associated dependent resources in the configuration file. You can specify one or more of the resources, and the others are automatically created.
129132

130133
If you use an existing storage account for the workspace, it must meet the following criteria. These requirements apply only to the *default* storage account for the workspace.
131134

132135
- Not a premium account (Premium_LRS or Premium_GRS).
133-
- Both Azure Blob and Azure File capabilities are enabled.
134-
- For Azure Data Lake Storage, hierarchical namespace is disabled.
136+
- Both Azure Blob and Azure File capabilities enabled.
137+
- For Azure Data Lake Storage, hierarchical namespace disabled.
135138

136139
To use an existing Azure container registry with an Azure Machine Learning workspace, you must [enable the admin account](/azure/container-registry/container-registry-authentication#admin-account) on the container registry.
137140

@@ -142,30 +145,30 @@ You must provide the existing resource IDs in the YAML file. You can get these I
142145
- **Azure Application Insights**:<br>
143146
`az monitor app-insights component show --app <application-insight-name> -g <resource-group-name> --query "id"`
144147
- **Azure Key Vault**:<br>
145-
`az keyvault show --name <key-vault-name> --query "ID"`
148+
`az keyvault show --name <key-vault-name> --query "id"`
146149
- **Azure Container Registry**:<br>
147150
`az acr show --name <acr-name> -g <resource-group-name> --query "id"`
148151

149152
The query results look similar to the following string:<br>
150-
`"/subscriptions/<service-GUID>/resourceGroups/<resource-group-name>/providers/<provider>/<subresource>/<resource-id>"`.
153+
`"/subscriptions/<service-GUID>/resourceGroups/<resource-group-name>/providers/<provider>/<subresource>/<id>"`.
151154

152-
## Advanced configurations
155+
## Secure Azure CLI communications
153156

154-
You can configure several advanced configurations for workspaces.
157+
All Azure Machine Learning V2 `az ml` commands communicate operational data, such as YAML parameters and metadata, to Azure Resource Manager. If your Azure Machine Learning workspace is public and isn't behind a virtual network, communications are secured by using HTTPS/TLS 1.2. No extra configuration is required.
155158

156-
### Configure workspace for private network connectivity
159+
If your Azure Machine Learning workspace uses a private endpoint and virtual network, you must choose one of the following configurations to use Azure CLI:
157160

158-
All Azure Machine Learning V2 `ml` commands communicate operational data, such as YAML parameters and metadata, to Azure Resource Manager. If your Azure Machine Learning workspace is public and isn't behind a virtual network, communications are secured by using HTTPS/TLS 1.2, and no extra configuration is required.
161+
- To communicate over the public internet, set the `--public-network-access` parameter in the YAML configuration file to `Enabled`.
159162

160-
If your Azure Machine Learning workspace uses a private endpoint and virtual network, you must choose one of the following configurations to use Azure Machine Learning CLI V2:
163+
- To increase security and avoid communicating over the public internet, configure Azure Machine Learning to use private network connectivity with an Azure Private Link endpoint, as described in the following section.
161164

162-
- To communicate over the public internet, set the `--public-network-access` parameter in the YAML configuration file to `Enabled`.
165+
### Configure workspace for private network connectivity
163166

164-
- To increase security and avoid communicating over the public internet, configure Azure Machine Learning to use private network connectivity with an Azure Private Link endpoint.
167+
Depending on your use case and organizational requirements, you can configure Azure Machine Learning to use private network connectivity. You can use the Azure CLI to deploy a workspace and a Private Link endpoint for the workspace resource.
165168

166169
Use the following process to secure communications with Azure Resource Manager by using Private Link:
167170

168-
1. [Secure your Azure Machine Learning workspace inside a virtual network using a private endpoint](how-to-configure-private-link.md).
171+
1. [Configure a private endpoint for your Azure Machine Learning workspace](how-to-configure-private-link.md).
169172
1. [Create a private link for managing Azure resources](/azure/azure-resource-manager/management/create-private-link-access-portal).
170173
1. [Create a private endpoint](/azure/azure-resource-manager/management/create-private-link-access-portal#create-private-endpoint) for the private link created in the previous step.
171174

@@ -174,11 +177,7 @@ For more information on using a private endpoint and virtual network with your w
174177
> [!IMPORTANT]
175178
> To configure the private link for Azure Resource Manager, you must be the **Owner** of the Azure subscription, and an **Owner** or **Contributor** on the root management group. For more information, see [Create a private link for managing Azure resources](/azure/azure-resource-manager/management/create-private-link-access-portal).
176179
177-
### Configure workspace for private network connectivity
178-
179-
Depending on your use case and organizational requirements, you can configure Azure Machine Learning to use private network connectivity. You can use the Azure CLI to deploy a workspace and a Private Link endpoint for the workspace resource.
180-
181-
When you use Private Link, your workspace can't use Azure Container Registry to build Docker images. In the YAML workspace configuration file, you must set the `image_build_compute` property to a CPU compute cluster name to use for Docker image environment building. You can also specify that the private link workspace isn't accessible over the internet by setting the `public_network_access` property to `Disabled`.
180+
When you use Private Link, your workspace can't use Azure Container Registry to build Docker images. In your YAML workspace configuration file, you must set the `image_build_compute` property to a CPU compute cluster name to use for Docker image environment building. You also specify that the private link workspace isn't accessible over the internet by setting the `public_network_access` property to `Disabled`.
182181

183182
:::code language="YAML" source="~/azureml-examples-main/cli/resources/workspace/privatelink.yml":::
184183

@@ -194,7 +193,7 @@ az network private-endpoint create \
194193
--connection-name workspace -l <location>
195194
```
196195

197-
To create the private DNS zone entries for the workspace, use the following commands:
196+
To create the private Domain Name System (DNS) zone entries for the workspace, use the following commands:
198197

199198
```azurecli-interactive
200199
# Add privatelink.api.azureml.ms
@@ -236,12 +235,17 @@ az network private-endpoint dns-zone-group add \
236235
--zone-name 'privatelink.notebooks.azure.net'
237236
```
238237

238+
## Advanced configurations
239+
240+
There are several other advanced configurations you can apply to workspaces.
241+
242+
<a name="#customer-managed-key-and-high-business-impact-workspace"></a>
239243
### Customer-managed key
240244

241245
By default, workspace metadata is stored in an Azure Cosmos DB instance that Microsoft maintains, and encrypted using Microsoft-managed keys. Instead of using the Microsoft-managed key, you can provide your own key. Using your own key creates an extra set of resources in your Azure subscription to store your data.
242246

243247
> [!NOTE]
244-
> Azure Cosmos DB isn't used to store information such as model performance, information logged by experiments, or information logged from your model deployments.
248+
> Azure Cosmos DB isn't used to store model performance information, information logged by experiments, or information logged from your model deployments.
245249
246250
To create a workspace that uses your own key, use the `customer_managed_key` parameter in the YAML workspace configuration file, and specify the resource ID of the containing `key_vault` and the `key_uri` of the key within the vault.
247251

@@ -250,7 +254,7 @@ To create a workspace that uses your own key, use the `customer_managed_key` par
250254
To learn more about the resources that are created when you use your own key for encryption, see [Data encryption with Azure Machine Learning](./concept-data-encryption.md#azure-cosmos-db).
251255

252256
> [!NOTE]
253-
> To manage the added data encryption resources, use Identity and Access Management to authorize the Machine Learning App with contributor permissions on your subscription.
257+
> To manage the added data encryption resources, use Identity and Access Management to authorize the Machine Learning App with **Contributor** permissions on your subscription.
254258
255259
### High business impact workspace
256260

@@ -260,6 +264,8 @@ For more information on customer-managed keys and high business impact workspace
260264

261265
## Use Azure CLI to manage workspaces
262266

267+
You can use the [az ml workspace](/cli/azure/ml/workspace) commands to manage workspaces.
268+
263269
### Get workspace information
264270

265271
To get information about a workspace, use the following command:
@@ -288,7 +294,7 @@ For more information, see [az ml workspace update](/cli/azure/ml/workspace#az-ml
288294

289295
### Sync keys for dependent resources
290296

291-
If you change access keys for one of the resources your workspace uses, it takes about an hour for the workspace to synchronize to the new key. To force the workspace to sync the new keys immediately, use the following command:
297+
If you change access keys for one of the resources your workspace uses, it takes about an hour for the workspace to synchronize to the new keys. To force the workspace to sync the new keys immediately, use the following command:
292298

293299
```azurecli-interactive
294300
az ml workspace sync-keys -n <workspace-name> -g <resource-group-name>
@@ -297,6 +303,16 @@ az ml workspace sync-keys -n <workspace-name> -g <resource-group-name>
297303
- For more information on the `sync-keys` command, see [az ml workspace sync-keys](/cli/azure/ml/workspace#az-ml-workspace-sync-keys).
298304
- For more information on changing keys, see [Regenerate storage access keys](how-to-change-storage-access-key.md).
299305

306+
### Move a workspace
307+
308+
Moving an Azure Machine Learning workspace is currently in preview. For more information, see [Move Azure Machine Learning workspaces between subscriptions (preview)](how-to-move-workspace.md).
309+
310+
### Delete the Azure container registry
311+
312+
The Azure Machine Learning workspace uses Azure Container Registry for some operations, and automatically creates a Container Registry instance when it first needs one.
313+
314+
[!INCLUDE [machine-learning-delete-acr](includes/machine-learning-delete-acr.md)]
315+
300316
### Delete a workspace
301317

302318
To delete a workspace after it's no longer needed, use the following command:
@@ -310,25 +326,15 @@ az ml workspace delete -n <workspace-name> -g <resource-group-name>
310326
311327
[!INCLUDE [machine-learning-delete-workspace](includes/machine-learning-delete-workspace.md)]
312328

313-
Deleting a workspace doesn't delete the application insight, storage account, key vault, or container registry used by the workspace. Deleting the resource group deletes the workspace and all other Azure resources in the resource group. To delete the resource group, use the following command:
329+
Deleting a workspace doesn't delete the application insights, storage account, key vault, or container registry used by the workspace. To delete the workspace, the dependent resources, and all other Azure resources in the resource group, you can delete the resource group. To delete the resource group, use the following command:
314330

315331
```azurecli-interactive
316332
az group delete -g <resource-group-name>
317333
```
318334

319335
For more information, see [az ml workspace delete](/cli/azure/ml/workspace#az-ml-workspace-delete).
320336

321-
### Move the workspace
322-
323-
Moving a Azure Machine Learning workspace is currently in preview. For more information, see [Move Azure Machine Learning workspaces between subscriptions (preview)](how-to-move-workspace.md).
324-
325-
### Delete the Azure container registry
326-
327-
The Azure Machine Learning workspace uses Azure Container Registry for some operations, and automatically creates a Container Registry instance when it first needs one.
328-
329-
[!INCLUDE [machine-learning-delete-acr](includes/machine-learning-delete-acr.md)]
330-
331-
## Resource provider errors
337+
### Troubleshoot resource provider errors
332338

333339
[!INCLUDE [machine-learning-resource-provider](includes/machine-learning-resource-provider.md)]
334340

articles/machine-learning/includes/machine-learning-application-insight.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ ms.author: larryfr
77
---
88

99
> [!TIP]
10-
> An Azure Application Insights instance is created when you create the workspace. You can delete the Application Insights instance after cluster creation if you want. Deleting it limits the information gathered from the workspace, and may make it more difficult to troubleshoot problems. __If you delete the Application Insights instance created by the workspace, you cannot re-create it without deleting and recreating the workspace__.
10+
> An Azure Application Insights instance is created when you create the workspace. You can delete the Application Insights instance after cluster creation if you want. Deleting it limits the information gathered from the workspace, and might make it more difficult to troubleshoot problems. **If you delete the Application Insights instance created by the workspace, the only way to recreate it is to delete and recreate the workspace**.
1111
>
12-
> For more information on using this Application Insights instance, see [Monitor and collect data from Machine Learning web service endpoints](../how-to-enable-app-insights.md).
12+
> For more information on using the Application Insights instance, see [Monitor and collect data from Machine Learning web service endpoints](../how-to-enable-app-insights.md).

0 commit comments

Comments
 (0)