ICB-DCM / pyPESTO

python Parameter EStimation TOolbox
https://pypesto.readthedocs.io
BSD 3-Clause "New" or "Revised" License
206 stars 44 forks source link

Hierarchical: avoid recomputing inner parameters if simulation failed #1426

Closed dilpath closed 4 days ago

dilpath commented 5 days ago

result.x = None if simulation fails at the startpoint. result.x is used to compute hierarchical inner parameters after optimization. When result.x = None, an AMICI simulation to compute inner parameters is still run, unexpectedly... I didn't look deeper there, but this PR stops the computation of inner parameters if simulation fails at the startpoint (defined by result.x = None).

This PR means users do not see NaN in p AMICI simulation errors due to result.x = None. This can be confusing for users, who then try (and fail) to reproduce those errors with objective(result.x0).

codecov-commenter commented 5 days ago

:warning: Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.

Project coverage is 83.34%. Comparing base (10d6092) to head (ef1ac7a).

Files Patch % Lines
pypesto/objective/amici/amici.py 80.00% 1 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #1426 +/- ## ======================================== Coverage 83.33% 83.34% ======================================== Files 161 161 Lines 13235 13237 +2 ======================================== + Hits 11030 11032 +2 Misses 2205 2205 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.