Set parameters associated with CP manager Args: nodes: An array of nodes where this checkpoint manager is running. path_prefix: Used to construct db name or path where checkpoint files are stored. path_type: Indicate the type of path where
(self, nodes, path_prefix=None, path_type=None)
| 597 | return last_epoch |
| 598 | |
| 599 | def set_params(self, nodes, path_prefix=None, path_type=None): |
| 600 | """Set parameters associated with CP manager |
| 601 | |
| 602 | Args: |
| 603 | nodes: An array of nodes where this checkpoint manager is running. |
| 604 | path_prefix: Used to construct db name or path where checkpoint files are |
| 605 | stored. |
| 606 | path_type: Indicate the type of path where checkpoint files are stored. |
| 607 | """ |
| 608 | self._node_names = [str(node) for node in nodes] |
| 609 | if path_prefix: |
| 610 | self._path_prefix = path_prefix |
| 611 | if path_type: |
| 612 | self._path_type = path_type |
| 613 | if self._metadata_handler: |
| 614 | self._metadata_handler.set_params( |
| 615 | db_prefix=self._db_prefix, |
| 616 | db_type=self._db_type, |
| 617 | node_names=self._node_names, |
| 618 | path_prefix=self._path_prefix, |
| 619 | path_type=self._path_type) |
| 620 | |
| 621 | def cp_accessible(self, epoch=None): |
| 622 | """Returns True if Checkpoint data is accessible |
nothing calls this directly
no test coverage detected