vatlab / sos-notebook

Multi-language Jupyter Notebook
http://vatlab.github.io/SoS
BSD 3-Clause "New" or "Revised" License
174 stars 17 forks source link

Using sos kernel from the vscode interface #353

Open BoPeng opened 7 months ago

BoPeng commented 7 months ago

Installed vscode jupyterhub extension, connected to our jupyterhub server, created a jupyter notebook with sos kernel. Unfornately, the kernel does seem to work correctly.

Note that sos notebook could be executed in batch mode and we have magics such as %use to manually change subkernels of cells, so in theory using the sos kernel through the vscode interface can be made to work.

kundeng commented 5 months ago

Any updates?

BoPeng commented 5 months ago

Not really. The interfaces with JupyterLab contains a few JS function to interact with the frontend and does not work here. We may need to develop a pure text-based interface similar to how we implement sos-papermill, but it is hard to justify the effort.

chenruipu commented 3 months ago

Any updates? And i will be appriciated if you can provide more details about how to use the sos kernel through the vscode interface.

BoPeng commented 3 months ago

There is no way to get the language dropdown there, which can be overcome by using the %use magic more often. A more serious problem, however, is that (as far as I can tell) there is no way to know the kernel of the current cell, so it will always use the current kernel to execute the cell. This means all cells need to start with a %use magic to make sure the right kernel will be used.

Let me see if I can find some time to have a deeper look at the issue.

rubensa commented 2 months ago

In theory this should be feasible as the VSCode Polyglot Notebooks extension does something like this.

BoPeng commented 3 weeks ago

VSCode Polyglot Notebook is a totally different beast and it needs .NET installed locally (for my macOS X anyway).

Unless someone who is familiar with VSCode can point out what would be need to add that .NetIneractive button on VSCode/Jupyter, there is no way we can make sos notebook work with vs code.