Why are variable values in the remote Jupyter server lost when reconnecting? #9488
-
I have a python jupyter notebook server running on a server, and I use vscode to connect to the remote jupyter via the jupyter URI. For instance, if I previously use the webpage UI of jupyter to execute some cells, the variables produced will be still there if I close the browser and reopen it. But this is not the case using vscode. In vscode, all previously computed variables are lost if I close vscode and I have had to re-execute again when I reconnect to the remote server, even if I didn't restart the kernel at all. Actually, those variables are still there if I use webpage UI, but they are not recognized in vscode. I need the variables to be preserved since I am working on a large project which I cannot get everything down in one day. Is there any configuration of vscode that I am not aware of to make this work? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
What's your version of VS code and the Jupyter extension? This should work automatically if you reopen the same notebook. We remember the remote kernel id and reconnect to it when opening the notebook. However this was fixed/addressed rather recently. Can you try the latest prerelease bits with insiders to see if that works for you? |
Beta Was this translation helpful? Give feedback.
What's your version of VS code and the Jupyter extension?
This should work automatically if you reopen the same notebook. We remember the remote kernel id and reconnect to it when opening the notebook.
However this was fixed/addressed rather recently. Can you try the latest prerelease bits with insiders to see if that works for you?