MCPcopy
hub / github.com/huggingface/transformers / remove_dummy_checkpoint

Function remove_dummy_checkpoint

src/transformers/trainer_pt_utils.py:1070–1075  ·  view source on GitHub ↗
(is_main_process, output_dir, filenames)

Source from the content-addressed store, hash-verified

1068
1069
1070def remove_dummy_checkpoint(is_main_process, output_dir, filenames):
1071 if is_main_process:
1072 for filename in filenames:
1073 file = os.path.join(output_dir, filename)
1074 if os.path.isfile(file):
1075 os.remove(file)
1076
1077
1078if is_sagemaker_mp_enabled():

Callers 1

save_modelMethod · 0.85

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected