"git@developer.sourcefind.cn:OpenDAS/mmcv.git" did not exist on "8008f475abae6a42a7af808748c4b850456b00c1"
Commit 40acf6b5 authored by Chi-Liang Liu's avatar Chi-Liang Liu Committed by Julien Chaumond
Browse files

don't save model without training

parent 189ff9b6
...@@ -481,7 +481,7 @@ def main(): ...@@ -481,7 +481,7 @@ def main():
# Save the trained model and the tokenizer # Save the trained model and the tokenizer
if 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 # Create output directory if needed
if not os.path.exists(args.output_dir) and args.local_rank in [-1, 0]: if not os.path.exists(args.output_dir) and args.local_rank in [-1, 0]:
os.makedirs(args.output_dir) os.makedirs(args.output_dir)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment