Iker commited on
Commit
6e4adc1
1 Parent(s): a4abd95

Fix makedir bug

Browse files
Files changed (1) hide show
  1. eval.py +2 -2
eval.py CHANGED
@@ -101,8 +101,8 @@ def eval_files(
101
  result_dictionary["bert_score"] = inference()
102
 
103
  if output_path is not None:
104
- if not os.path.exists(os.path.dirname(output_path)):
105
- os.makedirs(os.path.dirname(output_path))
106
  with open(output_path, "w") as f:
107
  json.dump(result_dictionary, f, indent=4)
108
 
 
101
  result_dictionary["bert_score"] = inference()
102
 
103
  if output_path is not None:
104
+ if not os.path.exists(os.path.abspath(os.path.dirname(output_path))):
105
+ os.makedirs(os.path.abspath(os.path.dirname(output_path)))
106
  with open(output_path, "w") as f:
107
  json.dump(result_dictionary, f, indent=4)
108