(is_main_process, output_dir, filenames)
| 1068 | |
| 1069 | |
| 1070 | def 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 | |
| 1078 | if is_sagemaker_mp_enabled(): |