Skip to content

Commit 7a5b264

Browse files
author
Jill Grant
authored
Merge pull request #274223 from sdgilley/sdg-feedback
Update compute cluster
2 parents 2b2b754 + 938ae03 commit 7a5b264

9 files changed

+139
-50
lines changed

articles/machine-learning/how-to-create-attach-compute-cluster.md

Lines changed: 61 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ms.custom: devx-track-azurecli, cliv2, sdkv2, build-2023
1010
ms.author: vijetaj
1111
author: vijetajo
1212
ms.reviewer: sgilley
13-
ms.date: 01/25/2024
13+
ms.date: 05/03/2024
1414
---
1515

1616
# Create an Azure Machine Learning compute cluster
@@ -33,12 +33,30 @@ Learn how to:
3333

3434
* An Azure Machine Learning workspace. For more information, see [Manage Azure Machine Learning workspaces](how-to-manage-workspace.md).
3535

36-
* The [Azure CLI extension for Machine Learning service (v2)](how-to-configure-cli.md), [Azure Machine Learning Python SDK](/python/api/overview/azure/ai-ml-readme), or the [Azure Machine Learning Visual Studio Code extension](how-to-setup-vs-code.md).
36+
Select the appropriate tab for the rest of the prerequisites based on your preferred method of creating the compute cluster.
3737

38-
* If using the Python SDK, [set up your development environment with a workspace](how-to-configure-environment.md). Once your environment is set up, attach to the workspace in your Python script:
38+
# [Python SDK](#tab/python)
39+
40+
* If you're not running your code on a compute instance, install the [Azure Machine Learning Python SDK](/python/api/overview/azure/ai-ml-readme). This SDK is already installed for you on a compute instance.
41+
42+
* Attach to the workspace in your Python script:
3943

4044
[!INCLUDE [connect ws v2](includes/machine-learning-connect-ws-v2.md)]
4145

46+
# [Azure CLI](#tab/azure-cli)
47+
48+
* If you're not running these commands on a compute instance, install the [Azure CLI extension for Machine Learning service (v2)](how-to-configure-cli.md). This extension is already installed for you on a compute instance.
49+
50+
* Authenticate and set the default workspace and resource group. Leave the terminal open to run the rest of the commands in this article.
51+
52+
[!INCLUDE [cli first steps](includes/cli-first-steps.md)]
53+
54+
# [Studio](#tab/azure-studio)
55+
56+
Start at [Azure Machine Learning studio](https://ml.azure.com).
57+
58+
---
59+
4260
## What is a compute cluster?
4361

4462
Azure Machine Learning compute cluster is a managed-compute infrastructure that allows you to easily create a single or multi-node compute. The compute cluster is a resource that can be shared with other users in your workspace. The compute scales up automatically when a job is submitted, and can be put in an Azure Virtual Network. Compute cluster supports **no public IP** deployment as well in virtual network. The compute executes in a containerized environment and packages your model dependencies in a [Docker container](https://www.docker.com/why-docker).
@@ -69,7 +87,7 @@ The dedicated cores per region per VM family quota and total regional quota, whi
6987

7088
[!INCLUDE [min-nodes-note](includes/machine-learning-min-nodes.md)]
7189

72-
The compute autoscales down to zero nodes when it isn't used. Dedicated VMs are created to run your jobs as needed.
90+
The compute autoscales down to zero nodes when it isn't used. Dedicated VMs are created to run your jobs as needed.
7391

7492
Use the following examples to create a compute cluster:
7593

@@ -112,9 +130,9 @@ Create a single- or multi- node compute cluster for your training, batch inferen
112130

113131
1. Under **Manage**, select **Compute**.
114132

115-
1. If you have no compute resources, select **Create** in the middle of the page.
133+
1. If you have no compute resources, select **New** in the middle of the page.
116134

117-
:::image type="content" source="media/how-to-create-attach-studio/create-compute-target.png" alt-text="Screenshot that shows the Create button to create a compute target.":::
135+
:::image type="content" source="media/how-to-create-attach-studio/create-compute-target.png" alt-text="Screenshot that shows the New button to create a compute target.":::
118136

119137
1. If you see a list of compute resources, select **+New** above the list.
120138

@@ -127,15 +145,15 @@ Create a single- or multi- node compute cluster for your training, batch inferen
127145
|Field |Description |
128146
|---------|---------|
129147
| Location | The Azure region where the compute cluster is created. By default, this is the same location as the workspace. If you don't have sufficient quota in the default region, switch to a different region for more options. <br>When using a different region than your workspace or datastores, you might see increased network latency and data transfer costs. The latency and costs can occur when creating the cluster, and when running jobs on it. |
130-
|Virtual machine type | Choose CPU or GPU. This type can't be changed after creation. |
131-
|Virtual machine priority | Choose **Dedicated** or **Low priority**. Low priority virtual machines are cheaper but don't guarantee the compute nodes. Your job might be preempted. |
148+
|Virtual machine type | Choose CPU or GPU. This type can't be changed after creation. |
149+
|Virtual machine priority | Choose **Dedicated** or **Low priority**. Low priority virtual machines are cheaper but don't guarantee the compute nodes. Your job might be preempted. |
132150
|Virtual machine size | Supported virtual machine sizes might be restricted in your region. Check the [availability list](https://azure.microsoft.com/global-infrastructure/services/?products=virtual-machines) |
133151

134152
1. Select **Next** to proceed to **Advanced Settings** and fill out the form as follows:
135153

136154
|Field |Description |
137155
|---------|---------|
138-
|Compute name | * Name is required and must be between 3 to 24 characters long.<br><br> * Valid characters are upper and lower case letters, digits, and the **-** character.<br><br> * Name must start with a letter. <br><br> * Name needs to be unique across all existing computes within an Azure region. You see an alert if the name you choose isn't unique. <br><br> * If **-** character is used, then it needs to be followed by at least one letter later in the name. |
156+
|Compute name | * Name is required and must be between 3 to 24 characters long.<br><br> * Valid characters are upper and lower case letters, digits, and the **-** character.<br><br> * Name must start with a letter. <br><br> * Name needs to be unique across all existing computes within an Azure region. You see an alert if the name you choose isn't unique. <br><br> * If **-** character is used, then it needs to be followed by at least one letter later in the name. |
139157
|Minimum number of nodes | Minimum number of nodes that you want to provision. If you want a dedicated number of nodes, set that count here. Save money by setting the minimum to 0, so you don't pay for any nodes when the cluster is idle. |
140158
|Maximum number of nodes | Maximum number of nodes that you want to provision. The compute automatically scales to a maximum of this node count when a job is submitted. |
141159
| Idle seconds before scale down | Idle time before scaling the cluster down to the minimum node count. |
@@ -146,7 +164,7 @@ Create a single- or multi- node compute cluster for your training, batch inferen
146164

147165
### Enable SSH access
148166

149-
SSH access is disabled by default. SSH access can't be changed after creation. Make sure to enable access if you plan to debug interactively with [VS Code Remote](how-to-set-up-vs-code-remote.md).
167+
SSH access is disabled by default. SSH access can't be changed after creation. Make sure to enable access if you plan to debug interactively with [VS Code Remote](how-to-set-up-vs-code-remote.md).
150168

151169
[!INCLUDE [enable-ssh](includes/machine-learning-enable-ssh.md)]
152170

@@ -156,7 +174,7 @@ SSH access is disabled by default. SSH access can't be changed after creation.
156174

157175
---
158176

159-
## Lower your compute cluster cost with low priority VMs
177+
### Lower your compute cluster cost with low priority VMs
160178

161179
You can also choose to use [low-priority VMs](how-to-manage-optimize-cost.md#low-pri-vm) to run some or all of your workloads. These VMs don't have guaranteed availability and might be preempted while in use. You have to restart a preempted job.
162180

@@ -193,6 +211,38 @@ In the studio, choose **Low Priority** when you create a VM.
193211

194212
---
195213

214+
## Delete
215+
216+
While your compute cluster scales down to zero nodes when not in use, unprovisioned nodes contribute to your quota usage. Deleting the compute cluster removes the compute target from your workspace, and releases the quota.
217+
218+
# [Python SDK](#tab/python)
219+
220+
[!INCLUDE [sdk v2](includes/machine-learning-sdk-v2.md)]
221+
222+
This deletes the basic compute cluster, created from the `create_basic` object earlier in this article.
223+
224+
[!notebook-python[](~/azureml-examples-main/sdk/python/resources/compute/compute.ipynb?name=delete_cluster)]
225+
226+
# [Azure CLI](#tab/azure-cli)
227+
228+
[!INCLUDE [cli v2](includes/machine-learning-cli-v2.md)]
229+
230+
This deletes a compute cluster named `basic-example`.
231+
232+
```azurecli
233+
az ml compute delete --name basic-example
234+
```
235+
236+
# [Studio](#tab/azure-studio)
237+
238+
1. Navigate to [Azure Machine Learning studio](https://ml.azure.com).
239+
1. In the left menu, under **Manage**, select **Compute**.
240+
1. At the top of the Compute page, select **Compute cluster**.
241+
1. Select the cluster you want to delete.
242+
1. At the top of the page, select **Delete**.
243+
244+
---
245+
196246
## Set up managed identity
197247

198248
For information on how to configure a managed identity with your compute cluster, see [Set up authentication between Azure Machine Learning and other services](how-to-identity-based-service-authentication.md#compute-cluster).

articles/machine-learning/how-to-create-compute-instance.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ms.topic: how-to
1010
author: jesscioffi
1111
ms.author: jcioffi
1212
ms.reviewer: sgilley
13-
ms.date: 07/05/2023
13+
ms.date: 05/03/2024
1414
---
1515

1616
# Create an Azure Machine Learning compute instance
@@ -95,11 +95,11 @@ Where the file *create-instance.yml* is:
9595
1. Select **Compute instance** at the top.
9696
1. If you have no compute instances, select **Create** in the middle of the page.
9797

98-
:::image type="content" source="media/how-to-create-attach-studio/create-compute-target.png" alt-text="Screenshot shows create in the middle of the page.":::
98+
:::image type="content" source="media/how-to-create-attach-studio/create-compute-instance.png" alt-text="Screenshot shows create in the middle of the page.":::
9999

100100
1. If you see a list of compute resources, select **+New** above the list.
101101

102-
:::image type="content" source="media/how-to-create-attach-studio/select-new.png" alt-text="Screenshot shows selecting new above the list of compute resources.":::
102+
:::image type="content" source="media/how-to-create-attach-studio/select-new-instance.png" alt-text="Screenshot shows selecting new above the list of compute resources.":::
103103

104104
1. Fill out the form:
105105

0 commit comments

Comments
 (0)