Skip to content

Commit 5dadbdb

Browse files
Update entigraph.py
1 parent da51c35 commit 5dadbdb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

baselines/EntiGraph/entigraph.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,8 @@ def load_and_dedup_data(input_file: str) -> List[str]:
338338

339339
# Save results
340340
output_dir = os.path.dirname(args.output_file)
341-
if output_dir and not os.path.exists(output_dir):
342-
os.makedirs(output_dir)
341+
if output_dir:
342+
os.makedirs(output_dir, exist_ok=True)
343343

344344
with open(args.output_file, "w", encoding="utf-8") as f:
345345
json.dump(results, f, indent=4, ensure_ascii=False)

0 commit comments

Comments
 (0)