- Más nuevo
- Más votos
- Más comentarios
You can reconnect to the previous Jupyter session by following steps:
- Start "jupyter notebook" in the Terminal
- Copy the URL to your clipboard (e.g. http://localhost:8889/tree?token=1234abcd....)
- Open the notebook
- Choose "Select Kernel" > "Select Another Kernel ..." > "Existing Jupyter Server ..." > "Enter the URL of the running Juputer Server..." > "Python3 (ipykernel)"
- Paste the URL you copied at step 2
- Reload your browser, the notebook opens but kernel is not selected yet
- Choose "Select Kernel" > "Select Another Kernel ..." > "Existing Jupyter Server ..." > "Enter the URL of the running Juputer Server..."
- Choose existing Jupyter Session, instead of Jupyter Kernel.
- Confirm that you can resume running your notebook.
With default kernels (e.g. "Python 3.10.14"), you cannot reconnect to the previous session after reloading/closing notebooks.
Thanks, Tomonori for your support.
To be more specific. This problems happens while using jupyter notebooks.
What I do:
-
Open new jupyter notebook
-
Start Python kernel and execute some cells.
-
Refresh the browser.
-
Try to retake my kernel but it is lost
In EMR Studio there is a button to reconnect to kernel. Maybe this could work in SageMaker Studio as well.
Thanks again Tomonori.
I've tried this workaround and it works.
It would be great if you could make it work with default kernels as well. I think this workaround could be somewhat difficult/tedious to non-technical users.
I understand the current behavior is not ideal. Same feature request is tracked in the upstream open-source vscode-jupyter repo here:
To avoid losing your files by reloading browser, you can use "Auto Save" setting.
About losing connection, I was not able to reproduce the issue. What I tested:
- Open Code Editor on my browser.
- Open new terminal
- Run "watch date" command, to keep printing date and time.
- Close the browser tab
- Reopen the Code Editor from SageMaker Studio screen
- Open new terminal
- Confirm "watch" terminal exists already, and it is still keeping printing date and time.
Please let us know if you are seeing different behavior when you follow the above steps.
Folks, this is related to a feature request that the VS Code Jupyter extension team is currently tracking in this issue. Please make sure you vote on it to get it prioritized.
Contenido relevante
- OFICIAL DE AWSActualizada hace 2 años
- OFICIAL DE AWSActualizada hace 2 años
- OFICIAL DE AWSActualizada hace 2 años
- OFICIAL DE AWSActualizada hace un año
Thank you for clarifying the issue. I will add another answer.