Jupyterhub: Is it possible to reconnect to environment and get back all variables?

Created on 6 Aug 2017  路  4Comments  路  Source: jupyterhub/jupyterhub

Hi, I have been working with python for some time but am new to Jupyter/JupyterHub so not familiar with the correct technical terminologies and the architecture, pardon me for that.
I have worked with RStudio servers and there it is possible that I can close the tab and then I can reconnect to the server and can start from where I left. That is all my variables, functions, imports would still be there. Is that also possible with Jupyterhub? A use case is, I use Jupyter on my lab's computer, but later I can connect to same notebook (with everything preserved) on my personal laptop? I guess, what I want to ask is whether the Kernel dies when we close the tab or is it independent of it.
I want to convince my system admins to setup JupyterHub servers as I think it would be a big boost to productivity, but that would depend on the above feature cause I guess without it JupyterHub would be not much different than simple Jupyter notebook.
Thanks for your help.

question

Most helpful comment

@minrk I have a related question. If I close the tab/browser on my laptop while the kernel is running a long computation and printing outputs, then reconnect to it later, will the output cells be updated after reconnecting? Currently I use ssh port forwarding to connect to Jupyter notebook/Lab sessions running on a remote server, and the output cells would stop update once the browser is closed (https://github.com/jupyterlab/jupyterlab/issues/4237). I'm wondering if JupyterHub stores and updates the cell outputs after closing the browser on the client side? Thanks!

All 4 comments

Shutting down the kernel is not connected to closing the tab - you can close the notebook on one browser and open it up on another and everything will still be there. However, when the kernel does shut down, everything will be gone unless you have saved it somewhere yourself. Your Hub deployment may also choose to shut down idle notebooks, in which case the kernel may be killed while you were gone. This is an admin choice, though, and not done by default.

without it JupyterHub would be not much different than simple Jupyter notebook.

JupyterHub is not much different than Jupyter notebook. The only real difference form a user perspective is that it adds a login page. The main thing JupyterHub provides is an easier way for your sysadmins to manage jupyter instances on behalf of all of their users.

@minrk I have a related question. If I close the tab/browser on my laptop while the kernel is running a long computation and printing outputs, then reconnect to it later, will the output cells be updated after reconnecting? Currently I use ssh port forwarding to connect to Jupyter notebook/Lab sessions running on a remote server, and the output cells would stop update once the browser is closed (https://github.com/jupyterlab/jupyterlab/issues/4237). I'm wondering if JupyterHub stores and updates the cell outputs after closing the browser on the client side? Thanks!

@yueqiw Any update after all these years!?

@jtlz2 Not really:) But I'd recommend running long non-interactive computations outside a notebook environment.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

iptizer picture iptizer  路  3Comments

GeorgianaElena picture GeorgianaElena  路  3Comments

consideRatio picture consideRatio  路  3Comments

pkasinathan picture pkasinathan  路  4Comments

BoomBidiBuyBuy picture BoomBidiBuyBuy  路  4Comments