-
Notifications
You must be signed in to change notification settings - Fork 295
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
Remote Jupyter server and kernel picker UX #11077
Comments
Here are my thoughts on this UX:
When I click to select a kernel, I see a very long list (this isn't all, I need to scroll down) that I think includes every Python binary in every virtual environment for every project I've ever worked on, on this machine. It's hard and I'm conflicted about this--I do like how it shows them alphabetically by name, shows the file location of the Python binary, and sub-groups them by environment manager. But it's a little confusing to me how it mixes the concept of a virtual environment with the concept of a Jupyter kernel, and it's not clear to me how to clean up the list to remove the ones I don't use anymore. It's also unclear to me why one of them is sometimes marked "Suggested" and I feel like the suggestion is usually not the one I want. I'm not sure why I need to click this separate button, far away in the bottom tray, to connect to a remote Jupyter server. For a long time, I didn't even notice it was there: When I'm connected to a remote server I can see an option to "Connect to Local Kernels" but when I'm connected to a local kernel there's no corresponding "Connect to Remote Kernels" option.
I don't think treating a remote Jupyter server as a Remote Window (like WSL / SSH / Dev Container) makes sense to me because my mental model is that only the notebook itself is talking to the remote Jupyter server, not all of VS Code is talking to it. And I don't know if it's the case that remote Jupyter servers always provide shell and filesystem access. Thinking about what I would want: I would like to have a pane on the left sidebar for the extension where I can manage a list of local and remote Jupyter kernels (maybe similar to how I would manage a list of database connections in a query editor tool), and then I could select one from that list when I run a notebook. I feel like this would give me much more control and enable me to keep my snake pit more organized. I think the discovery of existing Pythons on my machine is super useful, but it also leads to clutter and I want for a better way to manage that clutter. |
Adding some additional comments from our users on specific pain points to address-- Need better indication of remote connection, including updating the folder view in the context of remote
Remote connection needs to be persisted
Want my kernel / notebook states to be persisted between remote sessions
Connecting to remote servers with varying auth methods should be supported
Experience for switching between remote servers needs to be improved
I'd like to manage kernel persistence
I'd like to manage kernels in general
UX/UI needs to be improved (general need for improvements, including buggy-ness)Using notebooks with remote SSH is buggy
Using notebooks with remote Jupyter server connection is buggy
Kernel keeps dying
Kernel keeps hanging
Kernel loading takes too long
Learning curve for using remote servers in VS Code is high
|
Taking a step back. We show potentially a lot of information to users and it feels to me that we need to help users in understanding what they see and how to decide. Here's my mental model on what decisions a user has to take: graph TD
A{Do I have a running Jupyter Server?}
B(Select Server)
B1(Select Kernel)
C(Select environment from the system my window runs on)
D{Do I have environments with installed kernels?}
E(Select environment)
E1(Select kernel)
F{Reuse environment?}
G(Select environment)
H(Create environment)
A --> |yes| B
B --> B1
A --> |no | C
C --> D
D --> |yes| E
E --> E1
D --> |no| F
F --> |yes| G
F --> |no| H
From my point of view it would make sense to translate that decision making progress into a UI that makes sure that the user understands what decisions they make. There are a few questions that go along with that:
On a smaller point, I'm 100% with you that different connection tokens should be mapped to the same URL so that the user does not have the confusion of seeing multiple. |
Thanks for structuring the conversation with the flow diagram for user's decision-making process! Quick follow up q: what does it mean by "reusing" an environment in the diagram? That the user wants to use the same environment / kernel across different files in the workspace?
From my understanding, this is not abnormal for data scientists working in teams. For example, a data scientist would open a repo in a workspace that contains multiple data analysis projects nested in different folders. They then would have kernels for each project / notebook. Also, I believe that by default, notebooks each get their own kernel on Jupyter classic.
I like where this is going! This decision-making process makes sense, but I've been thinking on a similar note: how much of this can / should be streamline for different user / notebook / workspace states? A few other ones (in addition to the two you mention above) include:
My intuition here is that this doesn't need to be an explicit step--though folks do value seeing their environments bucketed / organized by different Python environment types.
I don't have much experience with Julia, but the current way we display this is the same with how Jupyter classic does (ish), which means that a user who knows to select a Julia kernel in their Jupyter kernel will be able to do so by clicking on it (either #1 or #2 🤔): |
Ref to prototyping env/kernel creation: #9640 |
Will be posting various scenario demos that I've mocked up. Scenario 1: Running a notebook for the first time with no environment/extensions installedThis mirrors what we do right now out of the box and then leverages the "auto-create environment" concept that @IanMatthewHuff is currently working on. CleanShot.2022-08-17.at.15.00.46.mp4 |
I really like it. I suppose my main question is how much we can get away with installing on users computers without a prompt / message? I love the basically zero notification flow, but I'm a tiny bit unsure if it's ok to drop 80mb in the workspace without a confirmation. I think so? But we might have to be careful about making sure that it gets added to .gitignore and things like that. |
I think we can include this dialog when installing the environment, and maybe with a "don't ask again" checkbox? |
Scenario 2: Running a notebook and using local environmentsThis is aimed for the users that already have the Python/Jupyter extensions installed and has local environments. We should do our best to only show the most likely environments they would use and if we have low certainty then we show the full kernel list. I'm also proposing showing only the environments they have used in the past and allow them to remove them and access them through a "Show more kernels" menu item. CleanShot.2022-08-18.at.11.45.35.mp4 |
Scenario 3: Running a notebook and using many local environmentsThis is for when we don't have great certainty that we'll pick the right kernel and directly jump to the "Select local kernel" quick pick. Once the users selected a kernel, it'll get added to the main kernel quick pick and will also be stored for the workspace when switching to a different notebook. There are other edge cases where if a user selects a different kernel in another notebook that we can discuss. CleanShot.2022-08-18.at.14.24.46.mp4 |
In Scenarios 2 & 3, I wonder if we should be more opinionated and default to auto-creating environments as opposed to asking the user. On one hand, reducing the number of actions the user needs to do would be preferred but you also don't want to auto-create environments they didn't expect. |
Scenario 4: Running a notebook on a remote jupyter serverThis is to make sure we account for the remote server connections and how we show that in this new list. There will always be a "Connect to jupyter server" command from the kernel picker and then once you are connected to that remote, the kernels will be listed in the "Show more kernels" list. Showing multiple remote kernels is TBD. CleanShot.2022-08-18.at.15.09.25.mp4 |
Thank you for making the clean shot videos for these scenarios! I have a few comments / questions. Scenario 2
Scenario 3
Scenario 4
Other food for thought...
|
@minsa110 I think that #11159 is going to address many of the questions that you asked regarding Scenario 2. I don't think the UX walkthroughs will have the full info on what kernels make the "short-list" cut line, that will be up to us to figure out. Scenario 3 I go have to admit I didn't quite grok the same way that Scenario 2 made sense to me. I think the only main reason might be that the back button also wasn't clear to me at that point the same way that Soojin wasn't sure on that. Adding the connect button to the bottom might help there. I would say that based on how we figure out the cut-line for scenario two we could make scenario 3 way less common. If we have nothing above the cut line then it might be good to just "raise up" something like the highest version global python or the "create environment" command to be above the cut line and just do scenario #2. I'm interested in what scenario 4 might look like with multiple remote connections. At some point we are pushing against the bounds of what we can do with the Quick Pick UI, but wondering about something like this:
Then connect a remote server
Then connect a second remote server
Like the quick pick is always only ever showing one set of kernels, but it's easy to swap between multiple connected servers and local kernel views. |
Closing in favor of the changes we made, grouping the kernel types by categories |
Define idealized UX for connecting to remote Jupyter servers
Open questions
1. If we were to improve current UX/UI...
What does the user expect to see in the kernel drop down list when...
a. Python not installed
b. Only global Python envs (is "Global Env" descriptive enough?)
c. Multiple Python environment manager types
Specify Jupyter Server for Connections
command? Current:How well are these remote server connection entry-points served?
a. Command line SSH
b. Remote-SSH extension
What does the user expect to see in the remote connection server drop down list when...
2. If we were to "reimagine" the UX/UI...
What does the user expect to see in the VS Code window when connected to a kernel / Jupyter server?
><
indicator on bottom left):a. How about when user types
jupyter notebook
in the integrated terminal? Should this open a Remote Window instance on VS Code?The text was updated successfully, but these errors were encountered: