-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cached simplify in ODE export #1672
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 neat
Codecov Report
@@ Coverage Diff @@
## develop #1672 +/- ##
===========================================
- Coverage 78.23% 78.19% -0.04%
===========================================
Files 70 70
Lines 11279 11286 +7
===========================================
+ Hits 8824 8825 +1
- Misses 2455 2461 +6
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Co-authored-by: Daniel Weindl <[email protected]>
…che; default pysb to not cache
ode = ODEModel( | ||
verbose=verbose, | ||
simplify=simplify, | ||
cache_simplify=cache_simplify, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's known to fail for pysb models, I think we shouldn't offer it as an option, but rather set it to False
and add a comment that it isn't compatible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, now not sure. Just tried to debug the PySB issue by settings the default value in pysb2amici
and ode_model_from_pysb_importer
to True
, but all tests in pytest test_pysb.py
passed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also the PEtab pysb test suite? I am worried about the failure in e.g. https://github.com/AMICI-dev/AMICI/runs/5219969341?check_suite_focus=true. If caching silently leads to wrong model equations, this is a severe issue. Unless we have a good explanation of why that happened there and know that it won't happen again, I'd keep it out of there.
After debugging with @dweindl , it seems to work for PySB (the tests in However, it fails for PySB if
One possible cause of failure might be related to the PySB objects that exist inside Hence, this feature is turned off by default, for PySB models. For SBML models, this caching can increase import times. For example, for a large model [1], this increased import times by approx. 10 mins, from 36 mins to 46 mins (some variability). However, no significant difference in RAM usage was seen. As the benefit of the caching appears to be model-specific, it is turned off by default for SBML models as well. [1] https://github.com/ICB-DCM/CS_Signalling_ERBB_RAS_AKT/tree/master/FroehlichKes2018/PEtab |
SonarCloud Quality Gate failed. |
Decreases import time of a specific model with events by approximately 2.6x (n=1 ...).