Skip to content

Commit

Permalink
Update src/python/benchmark_models_petab/base.py
Browse files Browse the repository at this point in the history
Co-authored-by: Dilan Pathirana <[email protected]>
  • Loading branch information
dweindl and dilpath authored Jun 29, 2024
1 parent 9bc6260 commit 4ccf41b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/python/benchmark_models_petab/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ def get_problem_yaml_path(id_: str) -> Path:
-------
The path to the PEtab problem YAML file.
"""
return Path(MODELS_DIR, id_, id_ + ".yaml")
yaml_path = Path(MODELS_DIR, id_, id_ + ".yaml")
if not yaml_path.exists():
yaml_path = Path(MODELS_DIR, id_, "problem.yaml")
if not yaml_path.exists():
raise ValueError(f"Could not find YAML for problem with ID `{id_}`.")
return yaml_path


def get_problem(id_: str) -> petab.Problem:
Expand Down

0 comments on commit 4ccf41b

Please sign in to comment.