microsoft / vscode-jupyter

VS Code Jupyter extension
https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter
MIT License
1.27k stars 284 forks source link

Choosing/changing remote local servers is buggy and confusing. #10363

Closed greazer closed 2 years ago

greazer commented 2 years ago

Prep

Bug 1

I'm still connected to my local kernel. I expected to have to choose a new kernel.

Bug 2

The suggested kernel will be the local kernel I'm already connected to. I expect to either have no suggestion, or a suggestion from the server I just connected to.

image

Bug 3

You'll run against the local kernel, yet the status bar says you're connected to a Remote Jupyter server. Highly confusing.

Bug 4

Cell "executes" indefinitely and I can't interrupt it.

image

I'm forced to reload.

JakeColor commented 2 years ago

Having similar issues recently on my Linux workstation:

  1. Spin up a server within a Docker container; confirm a kernel has also been started
  2. update "Specify Jupyter remote server for connections" within VS Code
  3. go to "select kernel" but no remote kernel is listed

Clues:

amunger commented 2 years ago

@JakeColor - I created a separate issue from your comment since you're not seeing the kernel at all, whereas the OP is just not having the remote kernel suggested, but it's still in the list.

minsa110 commented 2 years ago

RE: Bug 1 -- I have the same issue / confusion.

It says on the status bar (blue circle) that I'm connected to a remote Jupyter server, but it shows in the kernel picker (red circle) that I'm still connected to the local kernel. image

RE: Bug 2 -- also +1. In addition, the notebook's path is relative to where I started the kernel, but the file explorer shows my local file system, which makes it more confusing. For example, the Jupyter remote kernel I started was from the top node (see output for os.getcwd()), so to access my data, I have to do pd.read_csv('./data/housing.csv') instead of pd.read_csv('../data/housing.csv') which feels natural / right because of what's shown on the explorer. image

+1 on bug 3 & 4 as well. Def agreed that we need a better experience here...

binderjoe commented 2 years ago

This general issue is exacerbated when using Codespaces. Specifically, if you are connected to a Codespace running Jupyter server, the VS Code UI is confusing for two reasons:

  1. The kernel picker doesn't differentiate between kernels running locally versus in the codespace.
  2. The status bar denotes that the server is "local" when it is running in the codespace. While this is a different form of "remote" than what's reflected in the status bar, it's super confusing because conceptually the server is remote. Kernel Picking
rchiodo commented 2 years ago

@binderjoe I don't think the 'local' vs 'remote' problem is going to go away for codespaces. Remote is too overloaded a term.

We should create a separate issue to handle that issue specifically. Same thing happens when in a remote ssh scenario.

rchiodo commented 2 years ago

Created a separate issue for the codespaces issue: https://github.com/microsoft/vscode-jupyter/issues/10601

rchiodo commented 2 years ago

@minsa110 your remote file system not being the same as your local file system is a different issue. I believe this one would address that: https://github.com/microsoft/vscode-jupyter/issues/1366

connor4312 commented 2 years ago

I verified bugs 1-4 are present on seemingly the latest of things and on prerelease versions of Python and Jupyter

Let me know if there's additional steps needed to see the fixes

rchiodo commented 2 years ago

Sorry there's a setting. Added after the initial submission.

  "jupyter.showOnlyOneTypeOfKernel": true,

This setting was tested with test plan item #10911 though. I don't think this issue can really be verified because it's subjective.

connor4312 commented 2 years ago

Thanks, that seems to remove bugs 1-3. However I can still reproduce bug 4 with that setting present.

rchiodo commented 2 years ago

Bug 4 is actually covered by an existing issue: https://github.com/microsoft/vscode-jupyter/issues/10568