Repository navigation
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #539 +/- ##
==========================================
+ Coverage 78.85% 79.12% +0.26%
==========================================
Files 69 69
Lines 8043 8142 +99
Branches 1445 1475 +30
==========================================
+ Hits 6342 6442 +100
+ Misses 1214 1213 -1
Partials 487 487 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
dweindl
force-pushed
the
petab1to2-reparametrize-log
branch
from
October 15, 2026 12:00
2f22c43 to
bdad27e
Compare
This was referenced Oct 15, 2026
dweindl
added a commit
to PEtab-dev/PEtab
that referenced
this pull request
Oct 19, 2026
Add a non-normative page "Upgrading from PEtab v1" to the v2 documentation. It lists the structural changes, explains the numerical consequences of the removal of `parameterScale`, describes how to reparametrize log-scaled parameters (`log10_k` with `k = 10^log10_k`), the `reparametrize` option of `petab1to2`, the other changes affecting objective values (log10 observables, truncated priors, default prior), and how to verify a conversion. References #680. The `petab1to2` section describes PEtab-dev/libpetab-python#539. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
dweindl
force-pushed
the
petab1to2-reparametrize-log
branch
from
October 19, 2026 14:44
4be4d4a to
594265d
Compare
reparametrize_log and petab1to2(reparametrize=...)petab1to2(reparametrize=...)
dweindl
force-pushed
the
petab1to2-reparametrize-log
branch
5 times, most recently
from
October 21, 2026 13:16
2ce25b5 to
2b7cb7c
Compare
dweindl
added a commit
that referenced
this pull request
Oct 21, 2026
PEtab v2 has no `parameterScale`. To estimate a parameter `<id>` on log
scale, or to specify a prior for `log10(<id>)`, the v2 spec recommends
replacing `<id>` by a new parameter `log10_<id>` with `<id> =
10^log10_<id>`.
This adds `petab.v2.reparametrize_log(problem, parameter_ids, ...)`,
which does this for the given parameters on a copy of the problem and
returns the copy and the mapping of old to new parameter IDs:
* parameter table: log-transformed bounds (dropped for non-estimated
parameters) and nominal value; priors from the `priors` argument, or
derived from `log-normal`, `log-laplace` and `log-uniform` priors on
`<id>` (other priors on `<id>` raise; priors of non-estimated parameters
raise `NotImplementedError` unless dropped via `priors={<id>: None}`)
* SBML model: new parameter `log10_<id>` and initial assignment `<id> =
10^log10_<id>` (replacing any existing one; `<id>` stays
`constant=true`)
* observable/noise formulas and condition target values: `<id>` →
`10^log10_<id>`
* measurement overrides: replaced by the new IDs, numeric overrides are
log-transformed, and the placeholder `ph` is replaced by `10^ph` in the
formulas
A lower bound of `0` becomes `-inf`, following PEtab-dev/PEtab#682. If
other estimated parameters have priors, such a parameter needs an
explicit prior, since the default `uniform(lb, ub)` would be improper;
otherwise, a `ValueError` is raised. A nominal value of `0` becomes
`-inf`, assuming PEtab-dev/PEtab#685 is accepted, e.g., for parameters
fixed at `0`.
Problems with required extensions are not supported.
Base e (`log_<id>`) is supported as well. The procedure follows the one
described in the proposed v1→v2 migration guide (PEtab-dev/PEtab#680).
Split off from #539, which uses this in `petab1to2(reparametrize=...)`
to preserve v1 parameter-scale priors.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
dweindl
force-pushed
the
petab1to2-reparametrize-log
branch
3 times, most recently
from
October 21, 2026 14:19
50322ae to
a458869
Compare
dweindl
added a commit
to PEtab-dev/PEtab
that referenced
this pull request
Oct 21, 2026
Add a non-normative page "Upgrading from PEtab v1" to the v2 documentation. It lists the structural changes, explains the numerical consequences of the removal of `parameterScale`, describes how to reparametrize log-scaled parameters (`log10_k` with `k = 10^log10_k`), the `reparametrize` option of `petab1to2`, the other changes affecting objective values (log10 observables, truncated priors, default prior), and how to verify a conversion. References #680. The `petab1to2` section describes PEtab-dev/libpetab-python#539. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
PEtab v2 has no `parameterScale`. Converting a v1 `parameterScaleNormal` prior on a log10-scaled parameter to `log-normal` keeps the prior distribution, but changes the maximum a posteriori estimate. `petab1to2` and `petab_files_1to2` get a `reparametrize` argument to estimate log-scaled parameters as `log10_<id>`/`log_<id>` using `reparametrize_log`, which preserves the objective function: * `"none"` (default): don't reparametrize; warn about converted `parameterScale*` priors * `"priors"`: parameters with `parameterScale*` priors * `"all"`: all estimated log-scaled parameters without priors on linear scale; this also preserves the v1 default prior Log-scaled parameters that share a placeholder with selected parameters are added; for non-estimated ones, a nominal value of 0 becomes -inf, and their (ignored) priors are dropped. With `"all"`, parameters without parameter-scale priors are skipped if their placeholder can't be log-transformed. Parameters with a lower bound of 0 get a lower bound of -inf on log scale; they are skipped if their prior on log scale would be an improper uniform prior. The benchmark collection conversion test now also runs with `"all"`. References Benchmarking-Initiative/Benchmark-Models-PEtab#333 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dweindl
force-pushed
the
petab1to2-reparametrize-log
branch
from
October 21, 2026 14:31
a458869 to
54362c3
Compare
dweindl
marked this pull request as ready for review
October 21, 2026 16:57
This was referenced Oct 21, 2026
Open
dweindl
added a commit
to PEtab-dev/PEtab
that referenced
this pull request
Oct 21, 2026
Add a non-normative page "Upgrading from PEtab v1" to the v2 documentation. It lists the structural changes, explains the numerical consequences of the removal of `parameterScale`, describes how to reparametrize log-scaled parameters (`log10_k` with `k = 10^log10_k`), the `reparametrize` option of `petab1to2`, the other changes affecting objective values (log10 observables, truncated priors, default prior), and how to verify a conversion. References #680. The `petab1to2` section describes PEtab-dev/libpetab-python#539. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
dweindl
added a commit
to PEtab-dev/PEtab
that referenced
this pull request
Oct 21, 2026
Add a non-normative page "Upgrading from PEtab v1" to the v2 documentation. It lists the structural changes, explains the numerical consequences of the removal of `parameterScale`, describes how to reparametrize log-scaled parameters (`log10_k` with `k = 10^log10_k`), the `reparametrize` option of `petab1to2`, the other changes affecting objective values (log10 observables, truncated priors, default prior), and how to verify a conversion. References #680. The `petab1to2` section describes PEtab-dev/libpetab-python#539. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
dweindl
added a commit
to PEtab-dev/PEtab
that referenced
this pull request
Oct 21, 2026
Add a non-normative page "Upgrading from PEtab v1" to the v2 documentation. It lists the structural changes, explains the numerical consequences of the removal of `parameterScale`, describes how to reparametrize log-scaled parameters (`log10_k` with `k = 10^log10_k`), the `reparametrize` option of `petab1to2`, the other changes affecting objective values (log10 observables, truncated priors, default prior), and how to verify a conversion. References #680. The `petab1to2` section describes PEtab-dev/libpetab-python#539. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
dweindl
added a commit
to PEtab-dev/PEtab
that referenced
this pull request
Oct 21, 2026
Add a non-normative page "Upgrading from PEtab v1" to the v2 documentation. It lists the structural changes, explains the numerical consequences of the removal of `parameterScale`, describes how to reparametrize log-scaled parameters (`log10_k` with `k = 10^log10_k`), the `reparametrize` option of `petab1to2`, the other changes affecting objective values (log10 observables, truncated priors, default prior), and how to verify a conversion. References #680. The `petab1to2` section describes PEtab-dev/libpetab-python#539. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
dweindl
added a commit
to PEtab-dev/PEtab
that referenced
this pull request
Oct 21, 2026
Add a non-normative page "Upgrading from PEtab v1" to the v2 documentation. It lists the structural changes, explains the numerical consequences of the removal of `parameterScale`, describes how to reparametrize log-scaled parameters (`log10_k` with `k = 10^log10_k`), the `reparametrize` option of `petab1to2`, the other changes affecting objective values (log10 observables, truncated priors, default prior), and how to verify a conversion. References #680. The `petab1to2` section describes PEtab-dev/libpetab-python#539. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
dweindl
added a commit
to PEtab-dev/PEtab
that referenced
this pull request
Oct 21, 2026
Add a non-normative page "Upgrading from PEtab v1" to the v2 documentation. It lists the structural changes, explains the numerical consequences of the removal of `parameterScale`, describes how to reparametrize log-scaled parameters (`log10_k` with `k = 10^log10_k`), the `reparametrize` option of `petab1to2`, the other changes affecting objective values (log10 observables, truncated priors, default prior), and how to verify a conversion. References #680. The `petab1to2` section describes PEtab-dev/libpetab-python#539. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
dweindl
added a commit
to PEtab-dev/PEtab
that referenced
this pull request
Oct 21, 2026
Add a non-normative page "Upgrading from PEtab v1" to the v2 documentation. It lists the structural changes, explains the numerical consequences of the removal of `parameterScale`, describes how to reparametrize log-scaled parameters (`log10_k` with `k = 10^log10_k`), the `reparametrize` option of `petab1to2`, the other changes affecting objective values (log10 observables, truncated priors, default prior), and how to verify a conversion. References #680. The `petab1to2` section describes PEtab-dev/libpetab-python#539. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
dweindl
added a commit
to PEtab-dev/PEtab
that referenced
this pull request
Oct 21, 2026
Add a non-normative page "Upgrading from PEtab v1" to the v2 documentation. It lists the structural changes, explains the numerical consequences of the removal of `parameterScale`, describes how to reparametrize log-scaled parameters (`log10_k` with `k = 10^log10_k`), the `reparametrize` option of `petab1to2`, the other changes affecting objective values (log10 observables, truncated priors, default prior), and how to verify a conversion. References #680. The `petab1to2` section describes PEtab-dev/libpetab-python#539. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
dweindl
added a commit
to PEtab-dev/PEtab
that referenced
this pull request
Oct 21, 2026
Add a non-normative page "Upgrading from PEtab v1" to the v2 documentation. It lists the structural changes, explains the numerical consequences of the removal of `parameterScale`, describes how to reparametrize log-scaled parameters (`log10_k` with `k = 10^log10_k`), the `reparametrize` option of `petab1to2`, the other changes affecting objective values (log10 observables, truncated priors, default prior), and how to verify a conversion. References #680. The `petab1to2` section describes PEtab-dev/libpetab-python#539. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PEtab v2 has no
parameterScale. Converting a v1parameterScaleNormal(μ, σ)prior on alog10-scaled parameter tolog-normal(μ ln10, σ ln10)keeps the prior distribution, but adds a Jacobian term to the v2 MAP objective, which moves the optimum by−σ² ln10decades. No v2 prior over the unscaled parameter can preserve both the distribution and the optimum.petab1to2andpetab_files_1to2get areparametrizeargument, which usespetab.v2.reparametrize_log(#560) to estimatelog10_<id>(orlog_<id>) instead of<id>:"none"(default): current behaviour, now with a warning for convertedparameterScale*priors"priors": log-scaled parameters withparameterScale*priors"all": all estimated log-scaled parameters without priors on linear scale (i.e., withoutlogNormal,uniform, ...); this also preserves the v1 default prior (uniform on parameter scale)Log-scaled parameters sharing a placeholder with selected parameters are added. With
"all", parameters without parameter-scale priors are skipped (with a warning) if their placeholder can't be log-transformed (e.g., Bachmann has0offsets). Parameters withlowerBound = 0(allowed in v1 for log-scaled parameters with an initialization prior) getlowerBound = -infon log scale (PEtab-dev/PEtab#682). They are skipped with a warning if their prior on log scale would be an improper uniform prior, i.e., the v1 default prior if other estimated parameters have priors.Also fixes
petab1to2adding defaultuniformpriors to non-estimated parameters, and to all parameters if the v1 parameter table has anobjectivePriorTypecolumn, but no estimated parameter has a prior. Priors of non-estimated parameters are converted as before.Non-estimated parameters are only reparametrized if they share a placeholder with selected parameters. A nominal value of
0then becomes-inf, assuming PEtab-dev/PEtab#685 is accepted. Their priors are dropped, since they are ignored anyway (PEtab-dev/PEtab#686).Checked on the benchmark collection: all 35 problems convert and pass v2 linting with
"all"(now also tested in CI); with"priors", 44 parameters are reparametrized in Bachmann, Isensee, Raimundez and Schwen.Checked with AMICI (v1 importer vs. v2
PetabImporter, forward sensitivities) on 30 benchmark problems converted with"all"(5 large ones excluded), at the nominal parameters and at a shifted point: log-likelihoods agree to a relative difference of ≤ 2e-8, and gradients agree to ≤ 4e-4 of the largest gradient entry. The remaining deviations are due to integration tolerances. Log-priors are identical for Isensee and Raimundez. For Bachmann, they differ by a constant (6 log-scaled parameters with the v1 default prior that can't be reparametrized become linearuniform), so the MAP is preserved.The default is
"none"for now, to keeppetab1to2uninvasive, i.e., to not change the parametrization unless requested. Open to change.References Benchmarking-Initiative/Benchmark-Models-PEtab#333, PEtab-dev/PEtab#680, PEtab-dev/PEtab#683
🤖 Generated with Claude Code