Saving a state
The notebook state is the cell code, output, and variable values at a specific point in time.
Some variables aren't serialized and therefore can't be saved. For example, a variable with a file open for writing:
f = open("file.txt", "w").
A warning is shown for these variables during the assignment:
The following variables cannot be serialized:.
States is saved as checkpoints. For more information about working with checkpoints, see Versioning. Working with checkpoints
There are two save state modes: standard and automatic. Save modes only apply to regular cells. Cells with background operations create a checkpoint automatically after execution is complete or prompt the user to create one by running
In standard save mode, saving occurs after a cell or a group of cells is executed, or after execution throws an error.
If a group contains cells with background operations, then the state will be saved before the background operations are completed.
In auto-save mode, the state is saved in the following situations:
- If there are no computations for a while, DataSphere checks if the state of a notebook has changed, and saves the changes if necessary.
- If computing resources were switched to a different type.
- If you force a state save.
To enable auto-save mode:
- Open the Settings menu in your notebook.
- Select Autosave commit mode.
Forcing a state save
To force the saving of state in auto-save mode, click the in the top right-hand corner of the Checkpoints tab. You can also save the state by using the CMD+K or Ctrl+K keyboard shortcut.