You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/machine-learning/how-to-create-manage-compute-instance.md
+96-60Lines changed: 96 additions & 60 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ ms.topic: how-to
10
10
author: jesscioffi
11
11
ms.author: jcioffi
12
12
ms.reviewer: sgilley
13
-
ms.date: 11/10/2022
13
+
ms.date: 12/28/2022
14
14
---
15
15
16
16
# Create and manage an Azure Machine Learning compute instance
@@ -113,15 +113,13 @@ Where the file *create-instance.yml* is:
113
113
1. Select **Create** unless you want to configure advanced settings for the compute instance.
114
114
1. <aname="advanced-settings"></a> Select **Next: Advanced Settings** if you want to:
115
115
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.
* 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.
118
120
* Assign the computer to another user. For more about assigning to other users, see [Create on behalf of](#create-on-behalf-of-preview)
119
121
* 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
+
125
123
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).
126
124
127
125
### Enable SSH access
@@ -134,16 +132,50 @@ SSH access is disabled by default. SSH access can't be changed after creation.
> 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:
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)
140
172
141
173
> [!IMPORTANT]
142
174
> Items marked (preview) below are currently in public preview.
143
175
> 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.
144
176
> For more information, see [Supplemental Terms of Use for Microsoft Azure Previews](https://azure.microsoft.com/support/legal/preview-supplemental-terms/).
145
177
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.
147
179
148
180
A compute instance is considered inactive if the below conditions are met:
149
181
* 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:
152
184
* No SSH connections
153
185
* 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.
154
186
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:
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.
158
198
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.
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:
164
242
165
243
* REST API
166
244
167
245
Endpoint:
168
246
```
169
247
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
170
248
```
249
+
171
250
Body:
172
251
```JSON
173
252
{
174
253
"idleTimeBeforeShutdown": "PT30M" // this must be a string in ISO 8601 format
175
254
}
176
255
```
177
256
178
-
* CLIv2 (YAML): only configurable during new CI creation
179
257
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
187
259
188
-
```Python
189
-
# Note that idle_time_before_shutdown has been deprecated.
* ARM Templates: only configurable during new CI creation
194
260
```JSON
195
261
// Note that this is just a snippet for the idle shutdown property in an ARM template
196
262
{
@@ -204,7 +270,7 @@ Administrators can use a built-in [Azure Policy](./../governance/policy/overview
204
270
1. Navigate to Azure Policy in the Azure portal.
205
271
2. Under "Definitions", look for the idle shutdown policy.
206
272
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":::
208
274
209
275
3. Assign policy to the necessary scope.
210
276
@@ -252,36 +318,6 @@ You can also create your own custom Azure policy. For example, if the below poli
252
318
}
253
319
```
254
320
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:
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
-
285
321
## Schedule automatic start and stop
286
322
287
323
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.
0 commit comments