-
Notifications
You must be signed in to change notification settings - Fork 332
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
Interrupting ZMQ kernels is unsupported on Windows #597
Comments
Ref for the nteract notebook side: anaisbetts/spawn-rx#11 ( |
The idea would be to recreate jupyter client's win_interrupt.py, which you linked above, with something like node-ffi? I'd be happy to give it a try (it would take a while, however). |
Yes please @Foucl! I don't think anyone is working on this and we don't have the expertise. |
Hydrogen shouldn't register a keybinding for |
Rbox had registered the key binding. Needed to know a clean and less messy way of running R code in atom. |
You can run R code with hydrogen if you install the IR kernel: https://nteract.io/kernels/r |
Oh OK cool, Rbox uses Hydrogen to execute code and adds some custom keybindings. You can open a issue or a PR on their repo to remove the windows keybinding since it conflicts with the copy command. |
Thanks, Lukas. Will do. With IR kernel, I'm good to run the R code. However, some of the commands kept on executing forever no way to terminate them. Secondly, Would I again need to re-install all the r libraries installed earlier, code isn't finding them anymore? |
Hi, I'm currently working on this issue and trying to interrupt a kernel using this newly implemented kernel interrupt messaging feature So far I could implement control socket and sending Or do you think this approach seems inappropriate this time ? I think potential pitfall will be that we have to set kernelspec |
@aviatesk That error message comes from IPython. Judging by ipython/ipykernel#309 , IPython doesn't implement |
@n-riesco Thank you for replying me back. Oh maybe they are still in the process for implementing this feature ? (jupyter-xeus/xeus#56) So the best workaround for this still seems to implement Windows interrupt event listener like jupyter client has done within node.js ?? |
I'm not aware of any node.js modules to access If anyone wants to experiment with a solution, this is the relevant portion of code: Lines 144 to 153 in 25d7951
|
Here is some code I attempted to get working but couldn't (It is meant to be a port of jupyter's win_interrupt). I was using
If we truly wanted to support interrupting kernels, I think the most lightweight way is to create our own native binding of c code that calls the kernel functions matching the jupyter |
It's been almost 4 years now and we're still waiting for a feature to interrupt a computation. |
Anyone find a solution here? If not, anyone know of any hydrogen alternatives? I really like the single line executing functionality but this lack of an interrupt is tough to get past. |
Mit aware of a workaround. I'm using VS Code or Pycharm on Windows now,
they integrate with Jupyter in much the same way as hydrogen.
…On Thu, Jan 27, 2022, 13:25 Tom ***@***.***> wrote:
Anyone find a solution here? If not, anyone know of any hydrogen
alternatives? I really like the single line executing functionality but
this lack of an interrupt is tough to get past.
—
Reply to this email directly, view it on GitHub
<#597 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIMX2F5LTLPO7BZNC4NZFTUYFBWJANCNFSM4C5XJIIQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID:
***@***.***>
|
Hydrogen's "Interrupt Kernel" command is currently unsupported for ZMQ kernels on Windows. At the moment, the best workaround if you depend on this functionality is to install a notebook server and use only "remote" kernels.
The reason is that this command was designed to send SIGINT to the kernel process (i.e. the equivalent of typing Ctrl-C in a Unix terminal). Sending signals is not available on Windows.
Notebooks (and other kinds of remote kernels) don't have this issue because they have implemented an alternative using Windows OS APIs. Code links for reference: here, here, and here.
It would be ideal if Hydrogen also did this. Since no existing hydrogen developers have volunteered to write this functionality, I'm opening this issue to keep a record and invite contributions from the community. It shouldn't be too difficult to implement -- the major requirement is to actually have Windows installed for testing.
See also: #593
The text was updated successfully, but these errors were encountered: