dotnet / interactive

.NET Interactive combines the power of .NET with many other languages to create notebooks, REPLs, and embedded coding experiences. Share code, explore data, write, and learn across your apps in ways you couldn't before.
MIT License
2.87k stars 381 forks source link

Delete or rename subkernel #3668

Open tonidy opened 5 days ago

tonidy commented 5 days ago

The package and version I'm asking about:

.NET Interactive

© 2020 Microsoft Corporation

Version: 1.0.522904+cdfa48b2ea1a27dfe0f545c42a34fd3ec7119074

Library version: 1.0.0-beta.24229.4+cdfa48b2ea1a27dfe0f545c42a34fd3ec7119074

Build date: 2024-09-13T10:42:27.6738502Z

Question

After running this command:

#!connect jupyter --kernel-name pythonkernel --kernel-spec python3

Add I cannot find to rename/delete the subkernel, so I got 2 python subkernels:

image

I’m not sure if this is a new feature or if I’ve just overlooked it.

jonsequitur commented 5 days ago

This is the intended design. Sometimes having multiple kernels of the same type is desirable, e.g. for different environments (in the case of Python) or different database connections (in the case of SQL).

There's currently no gesture for removing a subkernel other than restarting the whole kernel.

tonidy commented 4 days ago

This is the intended design. Sometimes having multiple kernels of the same type is desirable, e.g. for different environments (in the case of Python) or different database connections (in the case of SQL).

That make senses, I understand now.

There's currently no gesture for removing a subkernel other than restarting the whole kernel.

What do you mean by restarting the whole kernel? Is it .NET Interactive kernel? Or we can use this restart:

image
jonsequitur commented 2 days ago

Yes, the Restart button restarts the whole kernel by ending the .NET Interactive process and starting a new instance.