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

Function get_checkpoint_name

Megatron-LM/utils.py:148–158  ·  view source on GitHub ↗
(checkpoints_path, iteration, release=False, zero=False)

Source from the content-addressed store, hash-verified

146
147
148def get_checkpoint_name(checkpoints_path, iteration, release=False, zero=False):
149 if release:
150 d = 'release'
151 else:
152 d = 'iter_{:07d}'.format(iteration)
153 if zero:
154 dp_rank = mpu.get_data_parallel_rank()
155 d += '_zero_dp_rank_{}'.format(dp_rank)
156 return os.path.join(checkpoints_path, d,
157 'mp_rank_{:02d}'.format(mpu.get_model_parallel_rank()),
158 'model_optim_rng.pt')
159
160
161def ensure_directory_exists(filename):

Callers 3

save_zero_checkpointFunction · 0.85
save_checkpointFunction · 0.85
load_checkpointFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected