Skip to content

Commit

Permalink
Merge pull request #85 from sbintuitions/feature/save_config
Browse files Browse the repository at this point in the history
[FIX] Feature/save config
  • Loading branch information
lsz05 authored Nov 22, 2024
2 parents ccadd5d + 90b3ff2 commit b4d0df2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
18 changes: 10 additions & 8 deletions src/jmteb/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,16 @@ def main(
raise ValueError("No evaluator is selected. Please check the config file or the command line arguments.")

# save config as yaml
parser.save(
args,
Path(args.save_dir) / "jmteb_config.yaml",
format="yaml",
overwrite=True,
multifile=False,
skip_check=True,
)
if args.save_dir:
Path(args.save_dir).mkdir(parents=True, exist_ok=True)
parser.save(
args,
Path(args.save_dir) / "jmteb_config.yaml",
format="yaml",
overwrite=True,
multifile=False,
skip_check=True,
)

args = parser.instantiate_classes(args)
if isinstance(args.evaluators, str):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ def test_main_cli():
# fmt: on
result = subprocess.run(command)
assert result.returncode == 0

assert (Path(f) / "jmteb_config.yaml").exists()
assert (Path(f) / "summary.json").exists()

0 comments on commit b4d0df2

Please sign in to comment.