Skip to content
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

Help: How to get sensitivities/gradient? #1583

Closed
willov opened this issue Nov 8, 2021 · 4 comments
Closed

Help: How to get sensitivities/gradient? #1583

willov opened this issue Nov 8, 2021 · 4 comments
Labels
bug python SBML SBML import related

Comments

@willov
Copy link
Contributor

willov commented Nov 8, 2021

Hello,
we have been looking at the PyPesto optimization example for optimization using amici and have tried to replicate it with another simple model.

However, we have troubles getting things to work. We are not getting any sensitivities from the model (rdata[“sllh”] = 0), and we cannot figure out why. Our parameter set is far from the optimum.
We have attached a small example with our model and our attempt to get the sensitivities.

What we have done:

  • Build model
  • Load/create edata
  • Simulated model and checked chi2 (correct compared against original implementation MATLAB)

We have tried to alter the model sensitivities settings, including switching between adjoint and forward, setting values for absolute and/or relative tolerance, and increased the maximum number of iterations, with no success.

We have also tried to optimize using pypesto, but we suspect that our error occurs earlier, so we have not included that code in the attached example.

Can you see anything that is obviously wrong?
We would be very appreciative of any help getting us in the right direction

Attached files: amici model test.zip
.

@dweindl
Copy link
Member

dweindl commented Nov 8, 2021

Hi @willov, this seems to be an issue in AMICI. We will have a closer look.

@dweindl dweindl added bug python SBML SBML import related labels Nov 8, 2021
@willov
Copy link
Contributor Author

willov commented Nov 9, 2021

Thanks for the quick reply. Maybe I should mention that we tested this on 0.11.18, but I just reran the example on 0.11.19, and I get the same behavior.
I should probably also mention that we converted a set of odes to sbml via yaml2sbml, if that could have an impact in some way.
The intermediate yaml-file is availble here: M1-yaml.txt

dweindl added a commit that referenced this issue Nov 9, 2021
Fixes a bug where dxdotdw would be wrongly set to zero despite w-dependent
SBML RateRules.

Partial fix for #1583
@dweindl
Copy link
Member

dweindl commented Nov 12, 2021

Hi @willov, please update AMICI to v0.11.20, which includes a fix for this issue.

@willov
Copy link
Contributor Author

willov commented Nov 12, 2021

Great! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug python SBML SBML import related
Projects
None yet
Development

No branches or pull requests

2 participants