Skip to content

Parameterized kernel specs#1431

Draft
AnastasiaSliusar wants to merge 20 commits intojupyter-server:mainfrom
AnastasiaSliusar:parametrizing_kernels
Draft

Parameterized kernel specs#1431
AnastasiaSliusar wants to merge 20 commits intojupyter-server:mainfrom
AnastasiaSliusar:parametrizing_kernels

Conversation

@AnastasiaSliusar
Copy link

@AnastasiaSliusar AnastasiaSliusar commented Jun 12, 2024

References

This work is in progress as JEP jupyter/enhancement-proposals#87.
This PR should be reviewed when the JEP has been accepted

Code changes

This PR includes support of custom_kernel_specs variable that is used to setup custom kernel specs before running a kernel.

This custom_kernel_specs includes kernel parameters which a user has selected from a kernel dialog on JupyterLab

How to use

if self.open_browser and not self.sock:
self.launch_browser()
if self.allow_insecure_kernelspec_params:
print("yesssssssssssssssss")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete this code

@vgvassilev
Copy link

One of the challenges when working with kernels and custom specs for static programming languages without inherent error recovery (think c/omp/cuda/c++) is the current communication between the server and the kernel. That is, we rely on zeromq-like systems to send the relevant messages to the kernel which is a separate process. That's flexible, however, it is very difficult to debug and reproduce issues with the kernel because gdb (and other debuggers) lack the infrastructure to allow multiple runs of the same command without restarting the server and re-initializing the debugger. On the server side we hit timeouts because of the distributed nature of the setup. Such workflow is very hard for novices and even for experts.

I am wondering, if we should check if the custom_spec does not contain some magic flag, eg -jupy-debug or similar and in this case we record the messages sent to the kernel and then when starting the kernel we can replay them. That would be a simple change here (or elsewhere) that will make a humongous difference in the life of developers and lower the entry barrier to kernel development.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants