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
Jason Grout ([jason@jasongrout.org](mailto:jason@jasongrout.org)), Safia Abdalla ([safia@safia.rocks](mailto:safia@safia.rocks)), John Lam ([jflam@microsoft.com](mailto:jflam@microsoft.com)), Kevin M. McCormick ([mckev@amazon.com](mailto:mckev@amazon.com)), Pierre Brunelle ([brunep@amazon.com](mailto:brunep@amazon.com)), Paul Ivanov ([pi@berkeley.edu](mailto:pi@berkeley.edu))
The jupyter client protocol around what "restart" means is ambiguous. Per Jupyter Client's [kernel shutdown documention](https://jupyter-client.readthedocs.io/en/latest/messaging.html#kernel-shutdown), the only guidance is:
12
14
> 'restart' : bool # False if final shutdown, or True if shutdown precedes a restart
@@ -16,13 +18,13 @@ This has led to a situation where certain jupyter subprojects (e.g. enterprise g
16
18
We propose to clarify this to always mean "restart-in-place", that is only restart the kernel itself. For
17
19
most usage of Jupyter, this change is a no-op as subprocess kernels already act like this.
18
20
19
-
# Motivation
21
+
##Motivation
20
22
21
23
This greatly improves the usability of remote kernels whose startup includes scheduling. By making this change,
22
24
restarts for remote kernels will be nearly as fast as those of local kernels. It also matches what we
23
25
believe to be the mental model of users when they click "restart".
24
26
25
-
# Guide-level explanation
27
+
##Guide-level explanation
26
28
27
29
The [protocol](https://jupyter-client.readthedocs.io/en/latest/messaging.html#kernel-shutdown) would describe
28
30
restart as optimally preserving as many resources outside the kernel as possible (e.g. restarting only the kernel process and its subprocess *not* any parent process).
@@ -32,12 +34,12 @@ When the kernel is a toplevel process (e.g. local kernels), there is no change.
32
34
When the kernel is not a toplevel process (e.g. when used in Enterprise Gateway), restart often means only the kernel restarts. To restart the whole progress group, the stop and start messages could be used. It's up to UIs
33
35
for how to display this difference (if any).
34
36
35
-
# Reference-level explanation
37
+
##Reference-level explanation
36
38
37
39
The `jupyter-client` messaging page would be updated to indicate this nuance. Any implementations that
38
40
treat restart differently would be updated to match this clarification.
39
41
40
-
# Rationale and alternatives
42
+
##Rationale and alternatives
41
43
42
44
A new message could be added, as proposed in the pre-JEP. In the [Jupyter Server meeting](https://github.com/jupyter-server/team-compass/issues/45#issuecomment-1682582186),
43
45
we concluded that is is likely most users want restart to only restart the kernel and not potentially reschedule resources. Therefore, a new message was not the best option.
@@ -46,15 +48,15 @@ is the same as a hard restart since it is the toplevel kernel process.
46
48
47
49
For users that want a hard restart, a stop followed by a start continues to be available. While this may be less convenient, a UI can trivially hide this two call process from the user.
48
50
49
-
# Prior art
51
+
##Prior art
50
52
51
53
N/A
52
54
53
-
# Unresolved questions
55
+
##Unresolved questions
54
56
55
57
Only the exact wording changes as proposed in [jupyter_client](https://github.com/jupyter/jupyter_client/pull/966).
56
58
57
-
# Future possibilities
59
+
##Future possibilities
58
60
59
61
We would make a service that implements a "hard restart" as discussed in the jupyter-server meeting.
60
62
No one on the meeting had an immediate use case for it.
Copy file name to clipboardExpand all lines: 80-kernel-info/kernel-info.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Support kernel\_info request on the control channel
1
+
# Support `kernel_info` request on the control channel
2
2
3
3
## Problem
4
4
@@ -14,9 +14,9 @@ We propose to state in the Jupyter Messaging Protocol that the `kernel_info` req
14
14
15
15
### Impact on existing implementations
16
16
17
-
This JEP impacts kernels since it requires them to support receiving 'kernel\_info\_request' on the control channel in addition to receiving them on the shell channel.
17
+
This JEP impacts kernels since it requires them to support receiving `kernel_info_request` on the control channel in addition to receiving them on the shell channel.
18
18
19
-
It also has an impact on the Jupyter Server. For example, the reference implementation of Jupyter Server will attempt to send a a `kernel_info` request on both channels and listen for a response from _either_ channel. Any response informs the UI that the kernel is connected.
19
+
It also has an impact on the Jupyter Server. For example, the reference implementation of Jupyter Server will attempt to send a a `kernel_info` request on both channels and listen for a response from _either_ channel. Any response informs the UI that the kernel is connected.
0 commit comments