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-access-terminal.md
+12-6Lines changed: 12 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -63,7 +63,6 @@ Access all Git operations from the terminal. All Git files and folders will be s
63
63
64
64
To integrate Git with your Azure Machine Learning workspace, see [Git integration for Azure Machine Learning](concept-train-model-git-integration.md).
65
65
66
-
67
66
## Install packages
68
67
69
68
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
79
78
## Add new kernels
80
79
81
80
> [!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.
83
82
84
83
To add a new Jupyter kernel to the compute instance:
85
84
@@ -106,12 +105,14 @@ To add a new Jupyter kernel to the compute instance:
106
105
Any of the [available Jupyter Kernels](https://github.com/jupyter/jupyter/wiki/Jupyter-kernels) can be installed.
107
106
108
107
### Remove added kernels
108
+
109
109
> [!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.
111
111
112
112
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.
113
113
114
114
To remove the kernelspec:
115
+
115
116
1. Use the terminal window to list and find the kernelspec:
116
117
117
118
```shell
@@ -125,13 +126,14 @@ To remove the kernelspec:
125
126
```
126
127
127
128
To also remove the conda environment:
129
+
128
130
1. Use the terminal window to list and find the conda environment:
129
131
130
132
```shell
131
133
conda env list
132
134
```
133
135
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:
135
137
136
138
```shell
137
139
conda env remove -n ENV_NAME
@@ -141,7 +143,11 @@ Upon refresh, the kernel list in your notebooks view should reflect the changes
141
143
142
144
## Manage terminal sessions
143
145
144
-
Select **View active sessions**in the terminal toolbar to see a list of all active terminal sessions. When there are no active sessions, this tab will be disabled.
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.
147
+
148
+
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.
149
+
150
+
Learn more about how to manage sessions running on your compute at [Managing notebook and terminal sessions](how-to-manage-compute-sessions.md).
145
151
146
152
> [!WARNING]
147
-
>Make sure you close any unused sessions to preserve your compute instance's resources. Idle terminals may impact performance of compute instances.
153
+
> Make sure you close any sessions you no longer need to preserve your compute instance's resources and optimize your performance.
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 reopen 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. With too many active sessions, you may find your terminal or notebook cell typing lags, or terminal or notebook command execution may feel slower than expected.
21
+
22
+
There's 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 reopen 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 reopen a notebook you'll have access to previously defined variables and execution state - in this case, you're 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. In the following image, you can see that the tooltip 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 select on a terminal link to reopen 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. In the following image, you can see that the tooltip 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.":::
0 commit comments