Skip to content

Commit 2f8d98e

Browse files
committed
Adding new compute session management doc
1 parent eb57c46 commit 2f8d98e

File tree

6 files changed

+61
-37
lines changed

6 files changed

+61
-37
lines changed

articles/machine-learning/how-to-access-terminal.md

Lines changed: 9 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ Access all Git operations from the terminal. All Git files and folders will be s
6363
6464
To integrate Git with your Azure Machine Learning workspace, see [Git integration for Azure Machine Learning](concept-train-model-git-integration.md).
6565

66-
6766
## Install packages
6867

6968
Install packages from a terminal window. Install Python packages into the **Python 3.8 - AzureML** environment. Install R packages into the **R** environment.
@@ -79,7 +78,7 @@ Or you can install packages directly in Jupyter Notebook, RStudio, or Posit Work
7978
## Add new kernels
8079

8180
> [!WARNING]
82-
> While customizing the compute instance, make sure you do not delete the **azureml_py36** or **azureml_py38** conda environments. Also do not delete **Python 3.6 - AzureML** or **Python 3.8 - AzureML** kernels. These are needed for Jupyter/JupyterLab functionality.
81+
> While customizing the compute instance, make sure you do not delete the **azureml_py36** or **azureml_py38** conda environments. Also do not delete **Python 3.6 - AzureML** or **Python 3.8 - AzureML** kernels. These are needed for Jupyter/JupyterLab functionality.
8382
8483
To add a new Jupyter kernel to the compute instance:
8584

@@ -106,12 +105,14 @@ To add a new Jupyter kernel to the compute instance:
106105
Any of the [available Jupyter Kernels](https://github.com/jupyter/jupyter/wiki/Jupyter-kernels) can be installed.
107106

108107
### Remove added kernels
108+
109109
> [!WARNING]
110-
> While customizing the compute instance, make sure you do not delete the **azureml_py36** or **azureml_py38** conda environments. Also do not delete **Python 3.6 - AzureML** or **Python 3.8 - AzureML** kernels. These are needed for Jupyter/JupyterLab functionality.
110+
> While customizing the compute instance, make sure you do not delete the **azureml_py36** or **azureml_py38** conda environments. Also do not delete **Python 3.6 - AzureML** or **Python 3.8 - AzureML** kernels. These are needed for Jupyter/JupyterLab functionality.
111111

112112
To remove an added Jupyter kernel from the compute instance, you must remove the kernelspec, and (optionally) the conda environment. You can also choose to keep the conda environment. You must remove the kernelspec, or your kernel will still be selectable and cause unexpected behavior.
113113

114114
To remove the kernelspec:
115+
115116
1. Use the terminal window to list and find the kernelspec:
116117

117118
```shell
@@ -125,13 +126,14 @@ To remove the kernelspec:
125126
```
126127
127128
To also remove the conda environment:
129+
128130
1. Use the terminal window to list and find the conda environment:
129131
130132
```shell
131133
conda env list
132134
```
133135
134-
3. Remove the conda environment, replacing ENV_NAME with the conda environment you'd like to remove:
136+
1. Remove the conda environment, replacing ENV_NAME with the conda environment you'd like to remove:
135137

136138
```shell
137139
conda env remove -n ENV_NAME
@@ -141,41 +143,11 @@ Upon refresh, the kernel list in your notebooks view should reflect the changes
141143

142144
## Manage terminal sessions
143145

144-
Terminal sessions can stay active if terminal tabs are not properly closed. Too many active terminal sessions can impact the performance of your compute instance.
146+
Terminal sessions can stay active if terminal tabs are not properly closed. Too many active terminal sessions can impact the performance of your compute instance.
145147

146148
Select **Manage active sessions** in the terminal toolbar to see a list of all active terminal sessions and shut down the sessions you no longer need.
147149

148-
Learn more about terminal and notebook sessions [on the next docs page]()
150+
Learn more about how to manage sessions running on your compute at [Managing notebook and terminal sessions](how-to-manage-compute-sessions.md).
149151

150152
> [!WARNING]
151-
> Make sure you close any sessions you no longer need to preserve your compute instance's resources and optimize your performance.
152-
153-
154-
155-
156-
## Managing notebook and terminal sessions
157-
158-
Notebook and terminal sessions run on the compute and represent and preserve the current state of your notebook or terminal.
159-
160-
When you re-open a notebook, or reconnect to a terminal session, this allows you to reconnect to the previous session state (including command history, execution history, and defined variables). However, too many active sessions may slow down the performance of your compute. This may make terminal or cell typing feel laggy, or cause terminal commands to feel slow or notebook execution to take longer than expected.
161-
162-
There is a session management panel in the Azure Machine Learning studio that can help you manage your active sessions and optimize the performance of your compute instance. You can navigate to this session management panel from the compute toolbar of either a terminal tab or a notebook tab.
163-
164-
> [!NOTE]
165-
> For optimal performance, we recommend you don’t keep more than ten active sessions - and the fewer the better.
166-
167-
<insert screenshot of session management panel>
168-
169-
### Terminal sessions
170-
Terminal sessions are terminated when you close a terminal tab in the Azure Machine Learning studio. If you navigate away from the Azure Machine Learning studio without closing it, the session may remain open and should be shut down if no longer needed.
171-
172-
Select **Manage active sessions** in the terminal toolbar to see a list of all active terminal sessions. You can see below that the icon shows the count of active terminal sessions.
173-
174-
<insert screenshot of terminal compute toolbar with "Manage active sessions" hovered>
175-
176-
### Notebook sessions
177-
In contrast, notebook sessions are kept active unless they are shut down explicitly. This enables you to reconnect to your previous notebook session state, and means that when you close a notebook tab, the session is kept active. If you'd like to reconnect to a notebook and have access to previously-defined variables and execution state, you will benefit from the active session. However, keeping too many notebook sessions open can slow down the performance of your compute.
178-
179-
Select **Manage active sessions** in the notebook toolbar to see a list of all active notebook sessions. You can see below that the icon shows the count of active notebook sessions.
180-
181-
<insert screenshot of terminal compute toolbar with "Manage active sessions" hovered>
153+
> Make sure you close any sessions you no longer need to preserve your compute instance's resources and optimize your performance.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
title: How to manage compute sessions
3+
titleSuffix: Azure Machine Learning
4+
description: Use the session management panel to manage the active notebook and terminal sessions running on a compute instance.
5+
services: machine-learning
6+
author: lebaro-msft
7+
ms.author: lebaro
8+
ms.reviewer: sgilley
9+
ms.service: machine-learning
10+
ms.subservice: core
11+
ms.topic: how-to
12+
ms.date: 12/21/2022
13+
# Customer intent: As a data scientist, I want to manage the notebook and terminal sessions on my compute instance for optimal performance.
14+
---
15+
16+
# Manage notebook and terminal sessions
17+
18+
Notebook and terminal sessions run on the compute and maintain your current working state.
19+
20+
When you re-open a notebook, or reconnect to a terminal session, you can reconnect to the previous session state (including command history, execution history, and defined variables). However, too many active sessions may slow down the performance of your compute. This may make terminal or cell typing feel laggy, cause terminal commands to feel slow, or cause notebook execution to take longer than expected.
21+
22+
There is a session management panel in the Azure Machine Learning studio that helps you manage your active sessions and optimize the performance of your compute instance. You can navigate to this session management panel from the compute toolbar of either a terminal tab or a notebook tab.
23+
24+
> [!NOTE]
25+
> For optimal performance, we recommend you don’t keep more than six active sessions - and the fewer the better.
26+
27+
:::image type="content" source="media/how-to-manage-compute-sessions/compute-session-management-panel.png" alt-text="Screenshot of compute session management panel.":::
28+
29+
## Notebook sessions
30+
31+
In the session management panel, you can select a linked notebook name in the notebook sessions section to re-open a notebook with its previous state.
32+
33+
Notebook sessions are kept active when you close a notebook tab in the Azure Machine Learning studio. So, when you re-open a notebook you will have access to previously-defined variables and execution state - in this case, you are benefitting from the active notebook session.
34+
35+
However, keeping too many active notebook sessions can slow down the performance of your compute. So, you should use the session management panel to shut down any notebook sessions you no longer need.
36+
37+
Select **Manage active sessions** in the terminal toolbar to open the session management panel and shut down the sessions you no longer need. You can see below that the icon shows the count of active notebook sessions.
38+
39+
:::image type="content" source="media/how-to-manage-compute-sessions/notebook-sessions-button.png" alt-text="Screenshot of notebooks sessions button in toolbar.":::
40+
41+
## Terminal sessions
42+
43+
In the session management panel, you can click on a terminal link to re-open a terminal tab connected to that previous terminal session.
44+
45+
In contrast to notebook sessions, terminal sessions are terminated when you close a terminal tab. However, if you navigate away from the Azure Machine Learning studio without closing a terminal tab, the session may remain open. You should be shut down any terminal sessions you no longer need by using the session management panel.
46+
47+
Select **Manage active sessions** in the terminal toolbar to open the session management panel and shut down the sessions you no longer need. You can see below that the icon shows the count of active terminal sessions.
48+
49+
:::image type="content" source="media/how-to-manage-compute-sessions/terminal-sessions-button.png" alt-text="Screenshot of terminal sessions button in toolbar.":::
50.9 KB
Loading
51.4 KB
Loading
23.6 KB
Loading

articles/machine-learning/toc.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,9 @@
400400
- name: Use a terminal
401401
displayName: git, github, clone, kernel, package
402402
href: how-to-access-terminal.md
403+
- name: Manage compute sessions
404+
displayName: sessions, terminal, kernel
405+
href: how-to-manage-compute-sessions.md
403406
- name: Set up VS Code extension
404407
displayName: Visual Studio Code, VSCode, debug, bugs, remote, compute, instance
405408
href: how-to-setup-vs-code.md

0 commit comments

Comments
 (0)