"vscode:/vscode.git/clone" did not exist on "c6eb983b2ee124c1e980f2f2f14dda5a54448881"
Commit c473d7e0 authored by janEbert's avatar janEbert
Browse files

Create output path directory if necessary

parent 3d14707a
......@@ -2,6 +2,7 @@ import argparse
import json
import logging
import fnmatch
import os
from lm_eval import tasks, evaluator
......@@ -94,6 +95,7 @@ def main():
print(dumped)
if args.output_path:
os.makedirs(os.path.dirname(args.output_path), exist_ok=True)
with open(args.output_path, "w") as f:
f.write(dumped)
......
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