MCPcopy Create free account
hub / github.com/AIS-SNU/Smart-Infinity / _create_checkpoint_file

Method _create_checkpoint_file

deepspeed/runtime/engine.py:3051–3061  ·  view source on GitHub ↗
(self, save_dir, tag, zero_checkpoint)

Source from the content-addressed store, hash-verified

3049 self._curr_save_path = None
3050
3051 def _create_checkpoint_file(self, save_dir, tag, zero_checkpoint):
3052 name_function = (self._get_zero_ckpt_name if zero_checkpoint else self._get_ckpt_name)
3053 try:
3054 checkpoint_name = name_function(save_dir, tag)
3055 path = os.path.dirname(checkpoint_name)
3056 self.checkpoint_engine.makedirs(path, exist_ok=True)
3057 except:
3058 logger.error(f"Failed saving model checkpoint to {save_dir} with tag {tag}")
3059 return False
3060
3061 return True
3062
3063 def _create_zero_checkpoint_files(self, save_dir, tag):
3064 success = True

Callers 2

save_checkpointMethod · 0.95

Calls 1

makedirsMethod · 0.80

Tested by

no test coverage detected