Skip to content

Commit 574397b

Browse files
authored
Merge pull request #222556 from sdgilley/sdg-update-ci
Replace terminology auto stop -> idle shutdown for compute instance
2 parents 33edeb3 + 464ac8e commit 574397b

File tree

6 files changed

+98
-62
lines changed

6 files changed

+98
-62
lines changed

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

Lines changed: 96 additions & 60 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: 11/10/2022
13+
ms.date: 12/28/2022
1414
---
1515

1616
# Create and manage an Azure Machine Learning compute instance
@@ -113,15 +113,13 @@ Where the file *create-instance.yml* is:
113113
1. Select **Create** unless you want to configure advanced settings for the compute instance.
114114
1. <a name="advanced-settings"></a> Select **Next: Advanced Settings** if you want to:
115115

116+
* Enable idle shutdown (preview). Configure a compute instance to automatically shut down if it's inactive. For more information, see [enable idle shutdown](#enable-idle-shutdown-preview).
117+
* Add schedule. Schedule times for the compute instance to automatically start and/or shutdown. See [schedule details](#schedule-automatic-start-and-stop) below.
116118
* Enable SSH access. Follow the [detailed SSH access instructions](#enable-ssh-access) below.
117119
* Enable virtual network. Specify the **Resource group**, **Virtual network**, and **Subnet** to create the compute instance inside an Azure Virtual Network (vnet). You can also select __No public IP__ (preview) to prevent the creation of a public IP address, which requires a private link workspace. You must also satisfy these [network requirements](./how-to-secure-training-vnet.md) for virtual network setup.
118120
* Assign the computer to another user. For more about assigning to other users, see [Create on behalf of](#create-on-behalf-of-preview)
119121
* Provision with a setup script (preview) - for more information about how to create and use a setup script, see [Customize the compute instance with a script](how-to-customize-compute-instance.md).
120-
* Add schedule. Schedule times for the compute instance to automatically start and/or shutdown. See [schedule details](#schedule-automatic-start-and-stop) below.
121-
* Enable auto-stop (preview). Configure a compute instance to automatically shut down if it's inactive. For more information, see [configure auto-stop](#configure-auto-stop-preview).
122-
123-
124-
122+
125123
You can also create a compute instance with an [Azure Resource Manager template](https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.machinelearningservices/machine-learning-compute-create-computeinstance).
126124

127125
### Enable SSH access
@@ -134,16 +132,50 @@ SSH access is disabled by default. SSH access can't be changed after creation.
134132

135133
[!INCLUDE [ssh-access](../../includes/machine-learning-ssh-access.md)]
136134

135+
137136
---
138137

139-
## Configure auto-stop (preview)
138+
139+
140+
141+
## Create on behalf of (preview)
142+
143+
> [!IMPORTANT]
144+
> Items marked (preview) below are currently in public preview.
145+
> The preview version is provided without a service level agreement, and it's not recommended for production workloads. Certain features might not be supported or might have constrained capabilities.
146+
> For more information, see [Supplemental Terms of Use for Microsoft Azure Previews](https://azure.microsoft.com/support/legal/preview-supplemental-terms/).
147+
148+
As an administrator, you can create a compute instance on behalf of a data scientist and assign the instance to them with:
149+
150+
* Studio, using the [Advanced settings](?tabs=azure-studio#advanced-settings)
151+
152+
* [Azure Resource Manager template](https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.machinelearningservices/machine-learning-compute-create-computeinstance). For details on how to find the TenantID and ObjectID needed in this template, see [Find identity object IDs for authentication configuration](../healthcare-apis/azure-api-for-fhir/find-identity-object-ids.md). You can also find these values in the Azure Active Directory portal.
153+
154+
* REST API
155+
156+
The data scientist you create the compute instance for needs the following be [Azure role-based access control (Azure RBAC)](../role-based-access-control/overview.md) permissions:
157+
158+
* *Microsoft.MachineLearningServices/workspaces/computes/start/action*
159+
* *Microsoft.MachineLearningServices/workspaces/computes/stop/action*
160+
* *Microsoft.MachineLearningServices/workspaces/computes/restart/action*
161+
* *Microsoft.MachineLearningServices/workspaces/computes/applicationaccess/action*
162+
* *Microsoft.MachineLearningServices/workspaces/computes/updateSchedules/action*
163+
164+
The data scientist can start, stop, and restart the compute instance. They can use the compute instance for:
165+
* Jupyter
166+
* JupyterLab
167+
* RStudio
168+
* Posit Workbench (formerly RStudio Workbench)
169+
* Integrated notebooks
170+
171+
## Enable idle shutdown (preview)
140172

141173
> [!IMPORTANT]
142174
> Items marked (preview) below are currently in public preview.
143175
> The preview version is provided without a service level agreement, and it's not recommended for production workloads. Certain features might not be supported or might have constrained capabilities.
144176
> For more information, see [Supplemental Terms of Use for Microsoft Azure Previews](https://azure.microsoft.com/support/legal/preview-supplemental-terms/).
145177
146-
To avoid getting charged for a compute instance that is switched on but inactive, you can configure auto-stop.
178+
To avoid getting charged for a compute instance that is switched on but inactive, you can configure when to shutdown your compute instance due to inactivity.
147179

148180
A compute instance is considered inactive if the below conditions are met:
149181
* No active Jupyter Kernel sessions (which translates to no Notebooks usage via Jupyter, JupyterLab or Interactive notebooks)
@@ -152,45 +184,79 @@ A compute instance is considered inactive if the below conditions are met:
152184
* No SSH connections
153185
* No VS code connections; you must close your VS Code connection for your compute instance to be considered inactive. Sessions are auto-terminated if VS code detects no activity for 3 hours.
154186

155-
Activity on custom applications installed on the compute instance isn't considered. There are also some basic bounds around inactivity time periods; CI must be inactive for a minimum of 15 mins and a maximum of three days.
187+
Activity on custom applications installed on the compute instance isn't considered. There are also some basic bounds around inactivity time periods; compute instance must be inactive for a minimum of 15 mins and a maximum of three days.
188+
189+
Also, if a compute instance has already been idle for a certain amount of time, if idle shutdown settings are updated to an amount of time shorter than the current idle duration, the idle time clock will be reset to 0. For example, if the compute instance has already been idle for 20 minutes, and the shutdown settings are updated to 15 minutes, the idle time clock will be reset to 0.
190+
191+
This setting can be configured during compute instance creation or for existing compute instances via the following interfaces:
192+
193+
# [Python SDK](#tab/python)
194+
195+
[!INCLUDE [sdk v2](../../includes/machine-learning-sdk-v2.md)]
156196

157-
Also, if a CI has already been idle for a certain amount of time, and the idle shutdown settings are updated to shut the CI off after an amount of time shorter than the current idle duration, then the idle time clock on the CI will be reset to 0. For example, if the CI has already been idle for 20 minutes, and the idle shutdown settings are updated to shut the CI off after 15 minutes of idle time, the idle time clock will be reset to 0.
197+
When creating a new compute instance, add the `idle_time_before_shutdown_minutes` parameter.
158198

159-
This setting can be configured during CI creation or for existing CIs via the following interfaces:
160-
* AzureML Studio
161-
162-
:::image type="content" source="media/how-to-create-attach-studio/idle-shutdown-advanced-settings.jpg" alt-text="Screenshot of the Advanced Settings page for creating a compute instance":::
163-
:::image type="content" source="media/how-to-create-attach-studio/idle-shutdown-update.jpg" alt-text="Screenshot of the compute instance details page showing how to update an existing compute instance with idle shutdown":::
199+
```Python
200+
# Note that idle_time_before_shutdown has been deprecated.
201+
ComputeInstance(name=ci_basic_name, size="STANDARD_DS3_v2", idle_time_before_shutdown_minutes="30")
202+
```
203+
204+
You cannot change the idle time of an existing compute instance with the Python SDK.
205+
206+
# [Azure CLI](#tab/azure-cli)
207+
208+
[!INCLUDE [cli v2](../../includes/machine-learning-cli-v2.md)]
209+
210+
When creating a new compute instance, add `idle_time_before_shutdown_minutes` to the YAML definition.
211+
212+
```YAML
213+
# Note that this is just a snippet for the idle shutdown property. Refer to the "Create" Azure CLI section for more information.
214+
# Note that idle_time_before_shutdown has been deprecated.
215+
idle_time_before_shutdown_minutes: 30
216+
```
217+
218+
You cannot change the idle time of an existing compute instance with the CLI.
219+
220+
# [Studio](#tab/azure-studio)
221+
222+
* When creating a new compute instance:
223+
224+
1. Select **Advanced** after completing required settings.
225+
1. Select **Enable idle shutdown**
226+
227+
:::image type="content" source="media/how-to-create-manage-compute-instance/enable-idle-shutdown.png" alt-text="Screenshot: Enable compute instance idle shutdown." lightbox="media/how-to-create-manage-compute-instance/enable-idle-shutdown.png":::
228+
229+
1. Specify the shutdown period.
230+
231+
* For an existing compute instance:
232+
233+
1. In the left navigation bar, select **Compute**
234+
1. In the list, select the compute instance you wish to change
235+
1. Select the **Edit** pencil in the **Schedules** section.
236+
237+
:::image type="content" source="media/how-to-create-manage-compute-instance/edit-idle-time.png" alt-text="Screenshot: Edit idle time for a compute instance." lightbox="media/how-to-create-manage-compute-instance/edit-idle-time.png":::
238+
239+
---
240+
241+
You can also change the idle time using:
164242
165243
* REST API
166244
167245
Endpoint:
168246
```
169247
POST https://management.azure.com/subscriptions/{SUB_ID}/resourceGroups/{RG_NAME}/providers/Microsoft.MachineLearningServices/workspaces/{WS_NAME}/computes/{CI_NAME}/updateIdleShutdownSetting?api-version=2021-07-01
170248
```
249+
171250
Body:
172251
```JSON
173252
{
174253
"idleTimeBeforeShutdown": "PT30M" // this must be a string in ISO 8601 format
175254
}
176255
```
177256

178-
* CLIv2 (YAML): only configurable during new CI creation
179257

180-
```YAML
181-
# Note that this is just a snippet for the idle shutdown property. Refer to the "Create" Azure CLI section for more information.
182-
# Note that idle_time_before_shutdown has been deprecated.
183-
idle_time_before_shutdown_minutes: 30
184-
```
185-
186-
* Python SDKv2: only configurable during new CI creation
258+
* ARM Templates: only configurable during new compute instance creation
187259

188-
```Python
189-
# Note that idle_time_before_shutdown has been deprecated.
190-
ComputeInstance(name=ci_basic_name, size="STANDARD_DS3_v2", idle_time_before_shutdown_minutes="30")
191-
```
192-
193-
* ARM Templates: only configurable during new CI creation
194260
```JSON
195261
// Note that this is just a snippet for the idle shutdown property in an ARM template
196262
{
@@ -204,7 +270,7 @@ Administrators can use a built-in [Azure Policy](./../governance/policy/overview
204270
1. Navigate to Azure Policy in the Azure portal.
205271
2. Under "Definitions", look for the idle shutdown policy.
206272

207-
:::image type="content" source="media/how-to-create-attach-studio/idle-shutdown-policy.png" alt-text="Screenshot for the idle shutdown policy in Azure portal.":::
273+
:::image type="content" source="media/how-to-create-attach-studio/idle-shutdown-policy.png" alt-text="Screenshot for the idle shutdown policy in Azure portal." lightbox="media/how-to-create-attach-studio/idle-shutdown-policy.png":::
208274

209275
3. Assign policy to the necessary scope.
210276

@@ -252,36 +318,6 @@ You can also create your own custom Azure policy. For example, if the below poli
252318
}
253319
```
254320

255-
## Create on behalf of (preview)
256-
257-
> [!IMPORTANT]
258-
> Items marked (preview) below are currently in public preview.
259-
> The preview version is provided without a service level agreement, and it's not recommended for production workloads. Certain features might not be supported or might have constrained capabilities.
260-
> For more information, see [Supplemental Terms of Use for Microsoft Azure Previews](https://azure.microsoft.com/support/legal/preview-supplemental-terms/).
261-
262-
As an administrator, you can create a compute instance on behalf of a data scientist and assign the instance to them with:
263-
264-
* Studio, using the [Advanced settings](?tabs=azure-studio#advanced-settings)
265-
266-
* [Azure Resource Manager template](https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.machinelearningservices/machine-learning-compute-create-computeinstance). For details on how to find the TenantID and ObjectID needed in this template, see [Find identity object IDs for authentication configuration](../healthcare-apis/azure-api-for-fhir/find-identity-object-ids.md). You can also find these values in the Azure Active Directory portal.
267-
268-
* REST API
269-
270-
The data scientist you create the compute instance for needs the following be [Azure role-based access control (Azure RBAC)](../role-based-access-control/overview.md) permissions:
271-
272-
* *Microsoft.MachineLearningServices/workspaces/computes/start/action*
273-
* *Microsoft.MachineLearningServices/workspaces/computes/stop/action*
274-
* *Microsoft.MachineLearningServices/workspaces/computes/restart/action*
275-
* *Microsoft.MachineLearningServices/workspaces/computes/applicationaccess/action*
276-
* *Microsoft.MachineLearningServices/workspaces/computes/updateSchedules/action*
277-
278-
The data scientist can start, stop, and restart the compute instance. They can use the compute instance for:
279-
* Jupyter
280-
* JupyterLab
281-
* RStudio
282-
* Posit Workbench (formerly RStudio Workbench)
283-
* Integrated notebooks
284-
285321
## Schedule automatic start and stop
286322

287323
Define multiple schedules for auto-shutdown and auto-start. For instance, create a schedule to start at 9 AM and stop at 6 PM from Monday-Thursday, and a second schedule to start at 9 AM and stop at 4 PM for Friday. You can create a total of four schedules per compute instance.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ ms.service: machine-learning
77
ms.subservice: core
88
ms.custom: event-tier1-build-2022
99
ms.topic: how-to
10-
author: swatig007
11-
ms.author: swatig
10+
ms.author: jcioffi
11+
author: jesscioffi
1212
ms.reviewer: sgilley
1313
ms.date: 05/04/2022
1414
---
110 KB
Loading
70.5 KB
Loading

0 commit comments

Comments
 (0)