Repository navigation
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #644 +/- ##
==========================================
+ Coverage 80.37% 80.73% +0.35%
==========================================
Files 75 75
Lines 8556 8714 +158
Branches 1561 1609 +48
==========================================
+ Hits 6877 7035 +158
+ Misses 1189 1187 -2
- Partials 490 492 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…ant` Models often set `constant="false"` for parameters that nothing in the model changes (e.g., Alkan_SciSignal2018, Fiedler_BMCSystBiol2016, Raia_CancerResearch2011, Weber_BMC2015 in the benchmark collection). Treat such parameters like constant ones: a non-constant parameter qualifies as condition parameter if it is not the target of any rule or event assignment, and not referenced by any algebraic rule (which may determine any non-constant entity it refers to). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Condition parameters only cover numeric changes in the first period. Tools that can handle more, like v1-style per-experiment parameter mappings and separate pre-equilibration and main-period values, can now select further parameters via `keep_target`. Their changes stay in the condition table if * nothing in the model or problem assigns the parameter (as for condition parameters), * it is only changed in the pre-equilibration and the first main period, to values that only depend on parameters of the parameter table that the model doesn't change (by rules, events, or initial assignments), * no value of a change encoded in the model depends on it, and * if its value differs between pre-equilibration and main period, no initial assignment, event trigger, `delay` argument, or size of a compartment with concentration-based species depends on it (where the jump of an encoded value would make the result depend on how the tool applies the main-period value). Dependencies are followed through assignment rules, algebraic rules, reaction rates, `rateOf`, and compartment sizes of concentration-based species. The check is conservative: it considers changes of all experiments and periods. The effective values per kept period are written to the condition table, i.e., pre-equilibration values persist into the main period. Values equal in both periods go to the shared experiment condition, others to the new `_petab_preequilibration_condition_<id>` and `_petab_main_condition_<id>`. In the benchmark collection, this allows keeping the changes of all five problems with pre-equilibration (35 parameters that are otherwise assigned by period-start events) and the 23 changes whose values are problem parameters, as in PEtab v1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dweindl
added a commit
to dweindl/libpetab-python
that referenced
this pull request
Nov 30, 2026
…tab-dev#645) The first main period of an experiment with pre-equilibration is always kept, so the `not period.condition_ids` check never skipped it. It got a period-start event and an experiment indicator even if it had no changes to encode, e.g., if it has no conditions. The same applied to any period whose conditions have no changes. Now the event is only created, and the indicator only used, if the period has changes to encode. Since PEtab-dev#579, this also means that an experiment with pre-equilibration whose changes are all kept in the condition table as condition parameters no longer gets an experiment indicator. Split off from PEtab-dev#644. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
dweindl
force-pushed
the
condition_parameters_keep_target
branch
from
November 30, 2026 19:44
52f7b1d to
22c54b6
Compare
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.
Follow-up to #579 and #645. #579 keeps numeric changes of unassigned constant parameters and species in the first period in the condition table instead of encoding them in the model. This extends that in two steps (one commit each; meant to be squash-merged, the first commit alone crashes on algebraic rules without math, which the second fixes):
Condition parameters regardless of
constant. Models often setconstant="false"for parameters that nothing in the model changes (e.g., Alkan_SciSignal2018, Fiedler_BMCSystBiol2016, Raia_CancerResearch2011, Weber_BMC2015 in the benchmark collection). Such parameters now qualify as condition parameters if they are not the target of a rule or event assignment and not referenced by an algebraic rule.keep_target. A new optional argument, a predicate on target IDs, through which tools can select further parameters whose changes stay in the condition table, if they can apply them: changes in the pre-equilibration and the first main period, including different values in both periods and values that refer to parameters of the parameter table (as with per-experiment parameter mappings in PEtab v1). A selected target is only kept if this is equivalent to encoding it:delayargument, or size of a compartment with concentration-based species depends on it.Dependencies are followed through assignment rules, algebraic rules, reaction rates,
rateOf, and compartment sizes of concentration-based species. The effective values per kept period are written to the condition table (pre-equilibration values persist into the main period). Values equal in both periods go to the shared experiment condition, others to new_petab_preequilibration_condition_<id>/_petab_main_condition_<id>conditions.In the benchmark collection, this allows keeping the changes of all five problems with pre-equilibration (35 parameters that are otherwise assigned by period-start events) and the 23 changes whose values are problem parameters, as in PEtab v1. The converted problems (models, conditions) are identical to those of a prototype of the same logic implemented in AMICI, for 27 problems in two upgrade variants each. With that prototype, the remaining gradient-evaluation overhead of upgraded v2 problems vs. PEtab v1 in AMICI/pyPESTO went from about 5 % to none (geometric mean over 13 problems).
AMICI will use
keep_targetfor the parameters it can set per experiment and per period; the integration follows in a separate AMICI PR.🤖 Generated with Claude Code