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:
committed by
GitHub
parent
740a1574f1
commit
a9eca74372
@@ -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):
|
||||||
os.remove(vocab_file)
|
try:
|
||||||
|
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):
|
||||||
|
|||||||
Reference in New Issue
Block a user