def save(self, epoch): """ Build a Task that is run once after `init_group` and after each epoch is run. This will execute a Save ops to serialize and persist blobs present in the global workspaace. """ with Task() as task: ops.Save(self.blob_list(), [], db=self._dbname(epoch), db_type=self._db_type, absolute_path=True) return task
def save(self, epoch): """ Build a Task that is run once after `init_group` and after each epoch is run. This will execute a Save ops to serialize and persist blobs present in the global workspace. """ logger.info('Saving to %s' % db_name(epoch, self._node_name, self._db_prefix)) with Task() as task: ops.Save( self.blob_list(), [], db=db_name(epoch, self._node_name, self._db_prefix), db_type=self._db_type, absolute_path=True) return task
def add_op(): ops.Save(self.blob_list(), [], db=self._current_db_name, db_type=self._db_type, absolute_path=True)