Builds a Task that loads only the necessary blobs from a checkpoint of the given epoch. The necessary blobs are given in the blob_names argument. Args: blob_names: A list of strings. Each string is the name of a blob. epoch: T
(self, blob_names, epoch)
| 293 | return self._timed_task('checkpoint_load', add_op) |
| 294 | |
| 295 | def load_blobs_from_checkpoint(self, blob_names, epoch): |
| 296 | """ |
| 297 | Builds a Task that loads only the necessary blobs from a checkpoint of |
| 298 | the given epoch. The necessary blobs are given in the blob_names |
| 299 | argument. |
| 300 | |
| 301 | Args: |
| 302 | blob_names: A list of strings. Each string is the name of a |
| 303 | blob. |
| 304 | epoch: The checkpoint epoch to load from. |
| 305 | |
| 306 | Returns: |
| 307 | A Task which loads the specified blobs from the checkpoint of the |
| 308 | given epoch. |
| 309 | """ |
| 310 | self._current_db_name = db_name(epoch, self._node_name, self._db_prefix) |
| 311 | logger.info('Load from %s' % self._current_db_name) |
| 312 | |
| 313 | def add_op(): |
| 314 | ops.Load( |
| 315 | [], |
| 316 | blob_names, |
| 317 | db=self._current_db_name, |
| 318 | db_type=self._db_type, |
| 319 | absolute_path=True, |
| 320 | allow_incomplete=True) |
| 321 | |
| 322 | return self._timed_task('checkpoint_partial_load', add_op) |
| 323 | |
| 324 | def check_db_exists(self, epoch): |
| 325 | logger.info('Check existence of %s' % |
no test coverage detected