Commit 8a4e90ff authored by Ananya Harsh Jha's avatar Ananya Harsh Jha
Browse files

corrected folder creation error for MNLI-MM, verified GLUE results

parent e0bf01d9
...@@ -950,6 +950,11 @@ def main(): ...@@ -950,6 +950,11 @@ def main():
task_name = "mnli-mm" task_name = "mnli-mm"
processor = processors[task_name]() processor = processors[task_name]()
if os.path.exists(args.output_dir + '-MM') and os.listdir(args.output_dir + '-MM') and args.do_train:
raise ValueError("Output directory ({}) already exists and is not empty.".format(args.output_dir))
if not os.path.exists(args.output_dir + '-MM'):
os.makedirs(args.output_dir + '-MM')
eval_examples = processor.get_dev_examples(args.data_dir) eval_examples = processor.get_dev_examples(args.data_dir)
eval_features = convert_examples_to_features( eval_features = convert_examples_to_features(
eval_examples, label_list, args.max_seq_length, tokenizer, output_mode) eval_examples, label_list, args.max_seq_length, tokenizer, output_mode)
......
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