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
* 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.
140
-
* Assign the computer to another user. For more about assigning to other users, see [Create on behalf of](#create-on-behalf-of-preview).inel
140
+
* Assign the computer to another user. For more about assigning to other users, see [Create on behalf of](#create-on-behalf-of-preview)
141
141
* 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).
142
142
* Add schedule (preview). Schedule times for the compute instance to automatically start and/or shutdown. See [schedule details](#schedule-automatic-start-and-stop-preview) below.
143
+
* Enable auto-stop (preview). Configure a compute instance to automatically shutdown if it is inactive. See [configure auto-stop](#configure-auto-stop-preview) for more details.
143
144
144
145
145
146
@@ -157,6 +158,58 @@ SSH access is disabled by default. SSH access can't be changed after creation.
157
158
158
159
---
159
160
161
+
## Configure auto-stop (preview)
162
+
To avoid getting charged for a compute instance that is switched on but inactive, you can configure auto-stop.
163
+
164
+
A compute instance is considered inactive if the below conditions are met:
165
+
* No active Jupyter Kernel sessions (this translates to no Notebooks usage via Jupyter, JupyterLab or Interactive notebooks)
166
+
* No active Jupyter terminal sessions
167
+
* No active AzureML runs or experiments
168
+
* No SSH connections
169
+
* 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.
170
+
171
+
Note that activity on custom applications installed on the compute instance is not 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 3 days.
172
+
173
+
This setting can be configured during CI creation or for existing CIs via the following interfaces:
174
+
* AzureML Studio
175
+
176
+
:::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":::
177
+
:::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":::
178
+
179
+
* REST API
180
+
181
+
Endpoint:
182
+
```
183
+
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
184
+
```
185
+
Body:
186
+
```JSON
187
+
{
188
+
"idleTimeBeforeShutdown": "PT30M" // this must be a string in ISO 8601 format
189
+
}
190
+
```
191
+
192
+
* CLIv2 (YAML) -- only configurable during new CI creation
193
+
194
+
```YAML
195
+
# Note that this is just a snippet for the idle shutdown property. Refer to the "Create" Azure CLI section for more information.
196
+
idle_time_before_shutdown_minutes: 30
197
+
```
198
+
199
+
* Python SDKv2 -- only configurable during new CI creation
0 commit comments