I am curious about exactly what notebook state information is saved whenever one clicks "save and checkpoint" in a Jupyter notebook. I know any python changes are saved, but I am wondering if the state of widgets/html that is "displayed" is also saved. For instance: Let's say I have button in the notebook that runs display(HTML(html))
when clicked. If I click that button, display the html, and then save my notebook, will the state of display be saved? Is the state of the notebooks "cells" saved, so that html that is displayed in a new cell is also saved?
Any direction to documentation about the "save and checkpoint" behavior is appreciated. Having trouble finding a detailed description in the Jupyter docs. Thanks!
"Save and checkpoint" is the same as using "Autosave" except that it makes a hidden backup copy on disk (in case you have a later autosave and want to revert). Some plugins can do more with save and checkpoint, like having many checkpoints, but that's not the default behavior.
As for whether it saves the widget state, the answer will sadly be: it depends. For simple, well-written widgets that for example just use
@interact
; it should. For more complex widgets, it may not because saving arbitrary state is not always feasible.The best way to know is the following: Write your code in a notebook, save and refresh the page. If it's still there it was saved, otherwise it's not.