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.
(self, epoch)
| 348 | self._metadata_handler.report(action_name, all_stats) |
| 349 | |
| 350 | def save(self, epoch): |
| 351 | """ |
| 352 | Build a Task that is run once after `init_group` and after each |
| 353 | epoch is run. This will execute a Save ops to serialize and persist |
| 354 | blobs present in the global workspace. |
| 355 | """ |
| 356 | self._current_db_name = db_name(epoch, self._node_name, self._db_prefix) |
| 357 | logger.info('Saving to %s' % self._current_db_name) |
| 358 | |
| 359 | def add_op(): |
| 360 | ops.Save( |
| 361 | self.blob_list(), [], |
| 362 | db=self._current_db_name, |
| 363 | db_type=self._db_type, |
| 364 | absolute_path=True) |
| 365 | |
| 366 | return self._timed_task('checkpoint_save', add_op) |
| 367 | |
| 368 | def write_checkpoint_metadata(self, epoch): |
| 369 | """ |