Is there a way to disable saving to checkpoints for Jupyter Notebooks?

前端 未结 2 1447
盖世英雄少女心
盖世英雄少女心 2021-02-20 04:19

I am working in an environment where writing to the disk space with a folder name like .ipynb_checkpoints is disallowed.

Unfortunately, this is Jupyter Noteb

2条回答
  •  遥遥无期
    2021-02-20 04:45

    There are couple of ways to stop autosaves.

    There is a contrib nbextension called AutoSaveTime if you have installed jupyter-contrib-nbextensions that adds an autosave time configuration on the toolbar of a notebook, just ensure:

    "autosavetime/main": true
    

    is set in your notebook.json configuration file.

    Alternatively in a Cell, to change the autosave value for the current notebook, you can write:

    %autosave 0
    

    Or you can change your custom.js to make this permanent for all notebooks:

    define([
        'base/js/namespace',
        'base/js/events'
        ],
        function(IPython, events) {
            events.on("notebook_loaded.Notebook",
                function () {
                    IPython.notebook.set_autosave_interval(0);
                }
            );
        }
    );
    

提交回复
热议问题