It would be really nice to save a snapshot of a notebook session or “workspace”, which includes all variables, which can be loaded back into memory. I tried exploring these options with no luck:
dill.dump_session(): This cannot save all variables, and if you have something that cannot be pickled like a Tensorflow object, it will fail.
%store magic. This also cannot save all types of variables. And is cumbersome such that you have to call this for each variable.
Things that can’t be serialised: https://github.com/cloudpipe/cloudpickle If this library can’t do it … you probably need some custom code for that object type.
JupyterLab has workspaces which you could use to store the layout of the UI.
The model_bytes get fed to a SQLite BlobField so an actual h5 file never touches disk, which is how I would imagine a session/ variable persister would centrally store things.