posit-dev / positron

Positron, a next-generation data science IDE
Other
2.38k stars 70 forks source link

Runtime for connecting to existing Jupyter servers #3257

Open seeM opened 3 months ago

seeM commented 3 months ago

A nice middle-ground between full-fledged remote development and local development is to be able to connect the notebook UI to an existing Jupyter server.

Python users often do this with Jupyter Notebook/Lab, especially since machine learning can often be computationally demanding so users have to rely on external servers. This may actually be table stakes for many Python data science users.

We may be able to implement this as a new JupyterServer runtime, perhaps in a positron-jupyter-server extension.

As an added bonus, this would be a pretty easy way for users to edit code locally but run it remotely in the editor + console + plots/variables pane setup.

seeM commented 3 months ago

We'd need to figure out how to get Jupyter Server to run our own kernels for full support. I'm not actually sure what happens if you try to use an ordinary Jupyter kernel with Positron – does it work at all?

jmcphers commented 3 months ago

Yes, you can use an ordinary Jupyter kernel using something like the Jupyter Adapter to bridge the protocols. An off the shelf kernel can work with the Console and Plots panes for basic I/O, but of course the backends for the custom Positron UI (Variables, Data Explorer, etc.) won't work without implementations on the kernel side.

I do think it'd be really valuable to support Jupyter Server. We could model this as an additional location for runtimes, with the runtimes themselves being the kernels available on the server.