jupyter_client icon indicating copy to clipboard operation
jupyter_client copied to clipboard

Parametrized kernels for passing arguments in to starting up kernels

Open balamuruganvg opened this issue 5 years ago • 5 comments

Please add support for parametrized kernels so that one can pass custom arguments in to the kernels from the client (API handlers).

@SylvainCorlay @jasongrout

balamuruganvg avatar Apr 22 '19 15:04 balamuruganvg

@SylvainCorlay - I couldn't find an issue from the previous discussion (last year?) on kernel arguments. Is there one?

CC also @takluyver @minrk

jasongrout avatar Apr 22 '19 16:04 jasongrout

Thanks for opening this issue. FWIW, we've had some discussion of parameterized kernels over in Enterprise Gateway. This is more along the lines of configuring the kernel runtime env but would also apply to explicit parameters as well.

kevin-bates avatar Apr 22 '19 16:04 kevin-bates

Thanks for the EG pointer @kevin-bates, its quite helpful.

balamuruganvg avatar Apr 22 '19 16:04 balamuruganvg

I could find the notes from the last dev meeting about parameterized kernels:

https://paper.dropbox.com/doc/Day-1-Kernels-jupyter_client-IPython-Notebook-server--Ab6UGuDRv_0wv95Z4NcGb1j8Ag-MyS7d8X4wkkhRQy7wClXY#:uid=671520827638401135554679&h2=Parameterised-kernelspecs

SylvainCorlay avatar Apr 25 '19 10:04 SylvainCorlay

A proof of concept relative to kernel providers can be found here: https://github.com/takluyver/jupyter_kernel_mgmt/pull/22

Note that I believe the core functionality would be to have metadata that describes the parameters (ideally adhering to a defined schema) returned from /api/kernelspecs, processed and prompted by front-end machinery to produce a simple dict of name/value pairs, then submitted in the /api/kernels POST body.

The nice thing about the kernel provider approach is that each provider would define and understand the parameters it supports. Of course the current model, given rich enough metadata, could perform validation in a similar manner.

kevin-bates avatar Aug 15 '19 16:08 kevin-bates