-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enrich Docs with Usage #28
Changes from 1 commit
8fbc0f7
d1dcabd
5d9f275
6f6c744
cc29bbe
5f7f01e
c0cf87b
9703053
217d93b
2dc55bd
aadfcbe
8c3f5b3
a83e4eb
cb88439
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
.. _server: | ||
|
||
======================= | ||
Use with Jupyter Server | ||
======================= | ||
|
||
This page describes the way `Jupyter Server <https://github.com/jupyter/jupyter_server>`_ uses the Kernel Management module. | ||
|
||
.. image:: ./images/kernel_mgmt_server.svg | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Minor nitpick in this image: the connection between Jupyter server and JKM is labelled "Jupyter Protocol (ZeroMQ)". This isn't quite right - Jupyter Server is using JKM through Python APIs (classes & functions), and through that talks the Jupyter protocol to the kernels themselves. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @takluyver great catch. I have updated the diagram to reflect this. There is still room for improvements on that diagram, but I think it is good-enough for now and at least does not show wrong info anymore. |
||
|
||
On the Jupyter Server side, each WEB handlers located in services/kernels/handlers: | ||
|
||
- MainKernelHandler | ||
- KernelHandler | ||
- KernelActionHandler | ||
- ZMQChannelHandler | ||
- MainKernelSpecHandler | ||
|
||
Each of these handlers have: | ||
|
||
- A ``kernel_manager`` - the default manager is `MappingKernelManager` provided by `jupyter_server`. | ||
- A ``kernel_finder`` - which is imported from the `jupyter_kernel_mgmt` library | ||
echarles marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Jupyter Server runs with a single `ServerApp` built around a ``SessionManager``. The SessionManager uses a ``MappingKernelManager``. All instances of MappingKernelManager have a ``KernelFinder``. | ||
|
||
The :ref:`included kernel providers <included_kernel_providers>` (:class:`KernelSpecProvider <jupyter_kernel_mgmt.discovery.KernelSpecProvider>` and :class:`IPykernelProvider <jupyter_kernel_mgmt.discovery.IPykernelProvider>`) register their entrypoints. | ||
|
||
.. code-block:: python | ||
|
||
entrypoints: | ||
jupyter_kernel_mgmt.kernel_type_providers' : [ | ||
'spec = jupyter_kernel_mgmt.discovery:KernelSpecProvider', | ||
'pyimport = jupyter_kernel_mgmt.discovery:IPykernelProvider', | ||
] | ||
|
||
External Providers can register their own entypoints, e.g the `kubernetes_kernel_provider <https://github.com/gateway-experiments/kubernetes_kernel_provider>`_ which extends the `remote_kernel_provider <https://github.com/gateway-experiments/remote_kernel_provider>`_. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think stating that the kubernetes provider extends remote kernel provider is that pertinent here. The RKP is more of an "abstract base provider". Instead, perhaps adding a link to Thomas' jupyter_ssh_kernels would be useful? @takluyver - are you okay with that? If not, you can reference the yarn kernel provider repo instead. (What happens here affects the corresponding diagram as well.) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. updated doc and text |
||
|
||
The interactions sequence between Jupyter Server and the Kernel Management is sketched here. | ||
|
||
.. image:: ./images/kernel_mgmt_server_sequence.svg |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
.. _standalone: | ||
|
||
================ | ||
Standalone Usage | ||
================ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this section could use more content. Although I'm not entirely aware of how There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added paragraphs for this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I may rework this more at a later point. It is meant to be a public Python API as well as a component for Jupyter server. |
||
|
||
The aim of the Kernel Management is to be integrated in larger application such as the :ref:`Jupyter Server <server>`. | ||
echarles marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Although, it can be used a standalone module to, for example, launch a :ref:`Kernel Finder <kernel_finder>` | ||
echarles marked this conversation as resolved.
Show resolved
Hide resolved
|
||
from the command line and get a list of :ref:`Kernel Specifications <kernelspecs>` | ||
|
||
.. code-block:: python | ||
|
||
python -m jupyter_kernel_mgmt.discovery |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ultimately this page probably belongs in the Jupyter Server docs, but if it makes sense to put it here at the moment, I don't have a problem with that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will work next week with @Zsailer on the jupyter server doc. If this is merged before, we can reshuffle the details and also do a second pass on the kernel mgmt docs.