Member-only story
How to change the autosave interval in Jupyter Notebooks
You can use this Jupyter extension
By default, a Jupyter Notebook saves your work every 2 minutes, and if you want to change this time interval you can do so by using the %autosave n
magic command; where n is the number of seconds, and if n=0 this means no autosaving.
But the %autosave
magic command produces effects only inside the notebook in which this command is run, and only in that particular session. If you shut down the notebook and re-open it you have to run the %autosave
command again, or if you open another notebook, also you have to run the command again.
So, wouldn’t it be nice if there were a way to make this setting global, and not have to run the %autosave
command over and over again?
Well… there is a solution. The autosavetime
Jupyter extension. This extension allows us to set the autosave interval globally either by using a GUI widget or by setting some parameters in this extension’s JS file.
Let’s start by installing it.
Installation
Firstly, we need to install the jupyter_contrib_nbextensions
python package. This package will then be used to install the extensions and to activate/deactivate a certain extension.