Build a Task that will be run by JobRunner when the job is to be resumed from a given epoch. This task will run a Load op that will load and deserialize all relevant blobs from a persistent storage.
(self, epoch, path_prefix=None, path_type=None)
| 269 | ) |
| 270 | |
| 271 | def load(self, epoch, path_prefix=None, path_type=None): |
| 272 | """ |
| 273 | Build a Task that will be run by JobRunner when the job is to be |
| 274 | resumed from a given epoch. This task will run a Load op that will |
| 275 | load and deserialize all relevant blobs from a persistent storage. |
| 276 | """ |
| 277 | self._current_db_name = db_name( |
| 278 | epoch, self._node_name, self._db_prefix, path_prefix |
| 279 | ) |
| 280 | db_type = path_type or self._db_type |
| 281 | logger.info("Loading checkpoints from = %s" % self._current_db_name) |
| 282 | |
| 283 | def add_op(): |
| 284 | ops.Load( |
| 285 | [], |
| 286 | self.blob_list(), |
| 287 | db=self._current_db_name, |
| 288 | db_type=db_type, |
| 289 | absolute_path=True, |
| 290 | keep_device=True, |
| 291 | ) |
| 292 | |
| 293 | return self._timed_task('checkpoint_load', add_op) |
| 294 | |
| 295 | def load_blobs_from_checkpoint(self, blob_names, epoch): |
| 296 | """ |