more fixes

This commit is contained in:
Peng Qi
2019-08-20 10:59:28 -07:00
parent a368b87791
commit 3bffd2e8e5
2 changed files with 2 additions and 2 deletions

View File

@@ -481,7 +481,7 @@ def main():
# Save the trained model and the tokenizer
if args.do_train and args.local_rank == -1 or torch.distributed.get_rank() == 0:
if args.do_train and (args.local_rank == -1 or torch.distributed.get_rank() == 0):
# Create output directory if needed
if not os.path.exists(args.output_dir) and args.local_rank in [-1, 0]:
os.makedirs(args.output_dir)