MCPcopy Create free account
hub / github.com/deepspeedai/DeepSpeed / ckpt_layer_path_list

Method ckpt_layer_path_list

deepspeed/runtime/pipe/module.py:593–600  ·  view source on GitHub ↗

Get all ckpt file list for a specific pipeline module layer.

(self, ckpt_dir, local_layer_idx)

Source from the content-addressed store, hash-verified

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. """
595 idx = local_layer_idx + self._local_start
596 layer_ckpt_path = os.path.join(ckpt_dir, f'layer_{idx:02d}-')
597 layer_ckpt_path += "*model_states.pt"
598 ckpt_files = glob.glob(layer_ckpt_path)
599 ckpt_files.sort()
600 return ckpt_files
601
602 def save_state_dict(self, save_dir, checkpoint_engine, exclude_frozen_params=False):
603 # TODO: Need to validate interaction of checkpoint_parallel_write_pipeline and fastwriter

Callers 1

load_state_dirMethod · 0.95

Calls 1

sortMethod · 0.80

Tested by

no test coverage detected