overwrite output directories if needed
This commit is contained in:
1 parent
62d78aa37e
commit
c888663f18
4 files changed
+4
-4
No files matched your search
@@ -179,7 +179,7 @@ def main():
|
||||
"If `do_predict` is True, then `predict_file` must be specified.")
|
||||
|
||||
if os.path.exists(args.output_dir) and os.listdir(args.output_dir) and args.do_train and not args.overwrite_output_dir:
|
||||
raise ValueError("Output directory () already exists and is not empty.")
|
||||
raise ValueError("Output directory {} already exists and is not empty. Use --overwrite_output_dir to overcome.".format(args.output_dir))
|
||||
if not os.path.exists(args.output_dir):
|
||||
os.makedirs(args.output_dir)
|
||||
|
||||
|
||||
Reference in new issue
Block a user