"docs/EN/vscode:/vscode.git/clone" did not exist on "4f7c54d87f32a1d0e220c8ec41caff275fb8e25b"
Unverified Commit d1327193 authored by Stella Biderman's avatar Stella Biderman Committed by GitHub
Browse files

Merge pull request #483 from janEbert/out-dir

Create output path directory if necessary
parents e7a212ff c473d7e0
......@@ -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