New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jupyter explicit kernel #3337
Jupyter explicit kernel #3337
Conversation
591507f
to
82607bc
Compare
…nitial loading, better layout, ...
82607bc
to
af10762
Compare
e163416
to
dcc4929
Compare
dcc4929
to
999ca02
Compare
I tested this (with the experimental image, and after restarting my dev project). Step 1 of your testing step, namely "existing notebook with known kernel → this doesn't show up" fails in multiple ways.
What you're implementing here reminds me of all the MANY subtle bugs we had with the default kernel, and kernels changing from what is in the notebook to the default, etc. They were all very subtle race conditions involving the project and client(s) opening the notebook at the same time, then making decisions. This kernel selection you're implementing here is like that, but even more difficult... For example, what if two people open the same notebook. If person A selects a kernel, then the "select kernel" screen for person B must properly update. Your current implementation fails in this case too: I strongly encourage you to spend at least 1-2 more days on this, and either finish it completely so it really works right and is in CoCalc. Or delete it. One or the other. Don't let it bitrot! |
I also have to wonder -- aren't there a lot of people that only ever use one kernel? E.g., I imagine basically all sage users only ever use Sage (I'm thinking, e.g., of my phd student Kevin). With this PR, he'll go from never thinking about kernel selection to having to make a choice and click a button every single time he makes a new notebook. And he has no possible way out of that added friction -- it would be good to have an account preference to have a default kernel. (In contrast, Sage worksheets continue to not have extra friction like this.) |
Hmm, I tested some of what you describe and it worked for me. It's not easy, yes. I'm wondering if what you really mean is a "do not ask again" boolean option. (if it is true && there is a default kernel in the settings → pick it without asking). I'm using that last-kernel setting for the quick selection as the first option, as a compromise to avoid searching around too much. I'll look into this, sure. |
This pull request introduces 2 alerts when merging 95818ab into 98b993e - view on LGTM.com new alerts:
Comment posted by LGTM.com |
This pull request introduces 2 alerts when merging 4481910 into f5827a7 - view on LGTM.com new alerts:
Comment posted by LGTM.com |
This pull request introduces 2 alerts when merging 38bf546 into f5827a7 - view on LGTM.com new alerts:
Comment posted by LGTM.com |
This pull request introduces 2 alerts when merging 8b9e86f into 9307736 - view on LGTM.com new alerts:
Comment posted by LGTM.com |
This pull request introduces 2 alerts when merging 984dd84 into 91d2639 - view on LGTM.com new alerts:
Comment posted by LGTM.com |
This pull request introduces 2 alerts when merging 303d3d8 into b0df27e - view on LGTM.com new alerts:
Comment posted by LGTM.com |
This pull request introduces 2 alerts when merging f6d5202 into d412a05 - view on LGTM.com new alerts:
Comment posted by LGTM.com |
This pull request introduces 2 alerts when merging f72380d into 1a1f026 - view on LGTM.com new alerts:
Comment posted by LGTM.com |
This pull request introduces 2 alerts when merging 906749d into 9a78ddc - view on LGTM.com new alerts:
Comment posted by LGTM.com |
This pull request introduces 2 alerts when merging 6d5823f into 0a3e655 - view on LGTM.com new alerts:
Comment posted by LGTM.com |
…default kernel (if there is one)
I didn't realize this is needs review. I'm refactoring a lot of relevant code which will directly conflict with this. Ugh. |
Merged. This is really good. Any bitrot/merge conflicts are on me now. |
Description
Jupyter notebooks without a kernel or an unknown one are a source of confusion. This patch presents a clear selection dialog with some explanations about what a kernel actually is to the user.
Reference: there are two situations the dialog shows up. either user requested, or when opening and the kernel is "bad". here is a side-by-side view of running this in two instances. The dialog only closes when a kernel is set by itself, when it wasn't opened by the user in the first place.
Testing Steps
important: switch to experimental image to see the suggestions.
Relevant Issues
I didn't check
Checklist:
Front end:
~/.smc/local_hub/local_hub.log
./w
in/src
Back end: