Customize a prefix for a specific pipeline module layer.
(self, ckpt_dir, local_layer_idx)
| 581 | return ckpt_name |
| 582 | |
| 583 | def ckpt_layer_path(self, ckpt_dir, local_layer_idx): |
| 584 | """Customize a prefix for a specific pipeline module layer. """ |
| 585 | idx = local_layer_idx + self._local_start |
| 586 | layer_ckpt_path = os.path.join(ckpt_dir, f'layer_{idx:02d}') |
| 587 | rank_repr = self._grid._topo.get_rank_repr(rank=self.global_rank) |
| 588 | if rank_repr != '': |
| 589 | layer_ckpt_path += f'-{rank_repr}' |
| 590 | layer_ckpt_path += '-model_states.pt' |
| 591 | return layer_ckpt_path |
| 592 | |
| 593 | def ckpt_layer_path_list(self, ckpt_dir, local_layer_idx): |
| 594 | """Get all ckpt file list for a specific pipeline module layer. """ |
no test coverage detected