Wav2vec2 finetuning shared file system (#17423)

* fix_torch_device_generate_test

* remove @

* [Fix shared file system]

Co-authored-by: Patrick von Platen <patrick@huggingface.co>
This commit is contained in:
Patrick von Platen
2022-05-25 16:04:43 -04:00
committed by GitHub
parent 740a1574f1
commit a9eca74372

View File

@@ -501,7 +501,12 @@ def main():
with training_args.main_process_first(): with training_args.main_process_first():
if training_args.overwrite_output_dir and os.path.isfile(vocab_file): if training_args.overwrite_output_dir and os.path.isfile(vocab_file):
try:
os.remove(vocab_file) os.remove(vocab_file)
except OSError:
# in shared file-systems it might be the case that
# two processes try to delete the vocab file at the some time
pass
with training_args.main_process_first(desc="dataset map vocabulary creation"): with training_args.main_process_first(desc="dataset map vocabulary creation"):
if not os.path.isfile(vocab_file): if not os.path.isfile(vocab_file):