(self, checkpoint_id, path)
return {
            'type': 'notebook',
            'content': self._read_notebook(
                os_checkpoint_path,
                as_version=4,
            ),
        }
Get a checkpoint for a notebook.
Get a checkpoint for a notebook.
Get a checkpoint for a notebook .
def get_notebook_checkpoint(self, checkpoint_id, path):
        """Get a checkpoint for a notebook."""
        path = path.strip('/')
        self.log.info("restoring %s from checkpoint %s", path, checkpoint_id)
        os_checkpoint_path = self.checkpoint_path(checkpoint_id, path)

        if not os.path.isfile(os_checkpoint_path):
            self.no_such_checkpoint(path, checkpoint_id)

        return {
            'type': 'notebook',
            'content': self._read_notebook(
                os_checkpoint_path,
                as_version=4,
            ),
        }
def get_notebook_checkpoint ( self , checkpoint_id , path ) : path = path . strip ( '/' ) self . log . info ( "restoring %s from checkpoint %s" , path , checkpoint_id ) os_checkpoint_path = self . checkpoint_path ( checkpoint_id , path ) if not os . path . isfile ( os_checkpoint_path ) : self . no_such_checkpoint ( path , checkpoint_id ) return { 'type' : 'notebook' , 'content' : self . _read_notebook ( os_checkpoint_path , as_version = 4 , ) , }