-
Notifications
You must be signed in to change notification settings - Fork 222
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
[JUPYTER DEPENDENCY][WIP] Add support for async kernel management #580
Conversation
5c2fa2a
to
a752f3f
Compare
a752f3f
to
b45b9a1
Compare
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.
gr8 change LGTM 👍
Just a question, #587 says we're not gonna support python2 any longer, but should we use coroutine
instead of async
?
@esevan - great question. I'm hoping this change For the time being, I believe we should continue using backward compatible code until we know we're going to not go back or the benefit of using the more native constructs is critical to the implementation's success. The most important aspect to this PR is that the dependent PRs get merged AND are part of releases, so we can then update our dependencies in Thanks. |
The dependent areas of jupyter_client and notebook are in the process of getting reworked due to compatibility issues of the original PRs. A subclassed approach is being looked at and we should have good information by the end of this week. Stay tuned. |
b45b9a1
to
8a63073
Compare
I've updated the description (along with the referenced PRs) to reflect the subclassed based approach introduced in the referenced PRs. The other thing to note is that we probably lose support for |
If anyone wants to take things for a spin, here's a zip of AsyncKernelManagement-wheels.zip I'll update the EG image shortly. |
An EG image built on the referenced PRs can be found at
|
This pull request has been mentioned on Jupyter Community Forum. There might be relevant details there: https://discourse.jupyter.org/t/scalable-enterprise-gateway/2014/2 |
Updated RemoteKernelManager's methods to coroutines and derive from jupyter_client's
AsyncIOLoopKernelManager
. In addition,RemoteMappingKernelManager
derives from notebook'sAsyncMappingKernelManager
.Converted various
time.sleep()
toyield gen.sleep()
which enables tornado to "slice-out" to a different request. As a result, convertingconfirm_remote_startup()
andhandle_timeout()
to coroutines was key.Updated the response socket to use asyncio non-blocking sockets.
NOTE: Installation of this PR requires that BOTH related Jupyter Client 428 and Notebook 4479 PRs be merged. Once merged, we need to update our dependencies to depend on those versions - thus the bracketed values in the title.
NOTE 2: With this change the kernel management class used in Kernel Gateway is skipped! The class provides support for single-instance kernels used for the
http-mode
. As a result, support that mode from EG users will not work. Since we want to copy the web handlers from JKG into EG to accommodate things like HA support, cutting out http-mode is probably something we should do anyway since it doesn't really fit in our wheelhouse.Fixes #86
Fixes #592
EDIT: The PRs referenced above have been updated to reflect the recent PRs submitted that use a subclass-based approach. Please see those PRs for a description the class hierarchy.