MCPcopy
hub / github.com/deepspeedai/DeepSpeedExamples / ensure_directory_exists

Function ensure_directory_exists

Megatron-LM/utils.py:161–164  ·  view source on GitHub ↗
(filename)

Source from the content-addressed store, hash-verified

159
160
161def ensure_directory_exists(filename):
162 dirname = os.path.dirname(filename)
163 if not os.path.exists(dirname):
164 os.makedirs(dirname)
165
166
167def get_checkpoint_tracker_filename(checkpoints_path):

Callers 2

save_zero_checkpointFunction · 0.85
save_checkpointFunction · 0.85

Calls 1

existsMethod · 0.45

Tested by

no test coverage detected