Skip to content

Prepare library API and docs for PEtab v2 problems - #328

Draft
dweindl wants to merge 1 commit into
Benchmarking-Initiative:masterfrom
dweindl:prep-v2-groundwork
Draft

dweindl wants to merge 1 commit into
Benchmarking-Initiative:masterfrom
dweindl:prep-v2-groundwork

Conversation

@dweindl

@dweindl dweindl commented Sep 29, 2026

Copy link
Copy Markdown
Member

Closes #327.

Prepares benchmark_models_petab and the repo docs so that problems/<id>/v2/ directories can be added later without further groundwork. No v2/ problem directory is created here — that's separate, later work.

  • Splits library access into benchmark_models_petab.v1 / .v2 submodules, mirroring petab.v1/petab.v2. Each exposes get_problem, get_problem_yaml_path, get_simulation_df. Top-level get_problem etc. keep their current (v1) behavior unchanged (base.py/test_base.py renamed to v1.py/test_v1.py).
  • v2.get_problem_yaml_path/get_problem raise a clear error when a problem has no v2/ yet (the normal case for essentially every problem right now).
  • Documents the v1/v2 equivalence policy in CONTRIBUTING.md: a problem's v1/ and v2/ encodings must represent exactly the same mathematical problem (same model, data, objective), though v2/ files may look structurally different to make idiomatic use of v2 features.
  • Adds an optional PR-template checklist item pointing at that policy.
  • Both v1/ and v2/ are documented as optional (at least one must be present), rather than implying v1/ is mandatory.

Out of scope, left for follow-up work: generating/hand-curating any actual problems/<id>/v2/ directory, an automated v1-vs-v2 equivalence checker, and updating the README overview table / INSTALL.md usage docs for v2 (postponed until real v2 problems exist).

🤖 Generated with Claude Code

Split benchmark_models_petab access into v1/v2 submodules mirroring
petab.v1/petab.v2, so a later piece of work can add problems/<id>/v2/
directories without further library or docs groundwork. Top-level
get_problem/get_problem_yaml_path/get_simulation_df keep their current
(v1) behavior unchanged.

Also documents the v1/v2 equivalence policy in CONTRIBUTING.md and adds
a corresponding optional PR-template checklist item.

References Benchmarking-Initiative#327.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Comment thread CONTRIBUTING.md
Comment on lines +16 to +17
A problem's `v1/` and `v2/` encodings must represent *exactly* the same mathematical problem:
same model, same data, same objective.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will probably need some refinement. How do we want to deal with the whole parameter scaling topic? Encode it in the model or condition table, ignore it, ...?

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prepare library API and docs for PEtab v2 problems

1 participant