-
Notifications
You must be signed in to change notification settings - Fork 47
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
Fix HierarchicalAmiciCalculator.__call__
not setting 'hess' in result
#1161
Conversation
…t upon simulation failure `HierarchicalAmiciCalculator.__call__` needs to set `'hess'` in the result dict, also in case of simulation failures. Closes #1160
Codecov Report
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. @@ Coverage Diff @@
## develop #1161 +/- ##
===========================================
- Coverage 88.16% 84.39% -3.77%
===========================================
Files 79 148 +69
Lines 5257 11673 +6416
===========================================
+ Hits 4635 9852 +5217
- Misses 622 1821 +1199
|
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.
Yes, I think for simulation failures it should return a nan hessian. I think I encountered a situation where that caused an issue if fides (with BFGS hessian, not analytical) is used with hierarchical optimization. So the changes as they are are good.
However, just to mention: I believe that the true hessian is not the same as the one given by AMICI, because of the hierarchical optimization of inner parameters. The gradient from AMICI is correct as the hierarchical parameters are optimal, so the derivatives cancel out. But I'm not sure that happens for the Hessian. It could even be correct, thinking about it now briefly, since the inner problem optimization is convex so for the optimum both first and second-order derivatives should be 0. But I'm not sure, would have to look at it in detail.
Would be great if you could double-check that. If not, we need to let That's independent of this PR - will merge this already. |
HierarchicalAmiciCalculator.__call__
needs to set'hess'
in the returned dict, also in case of simulation failures.Closes #1160