Repository navigation
Conversation
`sz`, `srz` and `ssigmaz` have the shape `nmaxevent x nplist x nz`, but `derivative_parameter_dimension` listed the parameter axis of `srz` as 2 and had no entries for `sz` and `ssigmaz`. The derivatives of `z` and `sigmaz` therefore failed with a `KeyError`, and the derivative of `rz` was taken along the event output axis. The test uses a time-triggered event, as `sz` does not account for the parameter dependence of state-dependent event times (AMICI-dev#3361). Fixes AMICI-dev#3571. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## main #3589 +/- ##
===========================================
- Coverage 80.75% 49.99% -30.77%
===========================================
Files 331 331
Lines 23699 23696 -3
Branches 1674 1674
===========================================
- Hits 19139 11847 -7292
- Misses 4554 11751 +7197
- Partials 6 98 +92
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
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.
Fix the derivatives of event outputs in
amici.adapters.fiddy.run_simulation_to_function_and_derivative.sz,srzandssigmazhave the shapenmaxevent x nplist x nz, butderivative_parameter_dimensionlisted the parameter axis ofsrzas 2 and had no entries forszandssigmaz. The derivatives ofzandsigmaztherefore failed with aKeyError, and the derivative ofrzwas taken along the event output axis (wrong values or anIndexError).The new test checks
z,rzandsigmazagainst finite differences. It uses a time-triggered event, asszdoes not account for the parameter dependence of state-dependent event times (#3361); once that is fixed, the test can also cover a state-dependent event. The event output for the event that does not trigger is constant, as AMICI setszto the output at the last time point butszto 0 for events that did not occur.Fixes #3571.
🤖 Generated with Claude Code