Skip to content

Commit 917d1f8

Browse files
Merge pull request #210751 from shouryaj/patch-4
Update how-to-create-manage-compute-instance.md
2 parents e81bd99 + f765c33 commit 917d1f8

File tree

3 files changed

+54
-1
lines changed

3 files changed

+54
-1
lines changed

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

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,10 @@ Where the file *create-instance.yml* is:
137137

138138
* Enable SSH access. Follow the [detailed SSH access instructions](#enable-ssh-access) below.
139139
* 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)
141141
* 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).
142142
* 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.
143144

144145

145146

@@ -157,6 +158,58 @@ SSH access is disabled by default. SSH access can't be changed after creation.
157158

158159
---
159160

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
200+
201+
```Python
202+
ComputeInstance(name=ci_basic_name, size="STANDARD_DS3_v2", idle_time_before_shutdown_minutes="30")
203+
```
204+
205+
* ARM Templates -- only configurable during new CI creation
206+
```JSON
207+
// Note that this is just a snippet for the idle shutdown property in an ARM template
208+
{
209+
"idleTimeBeforeShutdown":"PT30M" // this must be a string in ISO 8601 format
210+
}
211+
```
212+
160213
## Create on behalf of (preview)
161214
162215
As an administrator, you can create a compute instance on behalf of a data scientist and assign the instance to them with:
178 KB
Loading
152 KB
Loading

0 commit comments

Comments
 (0)