-
Notifications
You must be signed in to change notification settings - Fork 43
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 VecJac #245
Fix VecJac #245
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #245 +/- ##
==========================================
+ Coverage 84.95% 85.58% +0.62%
==========================================
Files 14 14
Lines 964 992 +28
==========================================
+ Hits 819 849 +30
+ Misses 145 143 -2
☔ View full report in Codecov by Sentry. |
It would be better, so as to avoid confusion between |
This is good to go. @ChrisRackauckas please take a look |
rerunning CI because of flaky ODE.jl "matrix contains infs/nans error" |
@avik-pal can you take a look? I know you looked at the vecjec potential usage in SciMLSensitivity and I think we should be trying to get it to there |
@avik-pal ping |
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.
This API looks great. We should be able to directly use it in SciMLSensitivty.jl after this is merged!
merge #244 first
In this PR, I have fixed some bugs in the implementation of
vector jacobian products
. In doing so, I have separated theVecJac
implementations forAutoFiniteDiff
, andAutoZygote
. The latter lives in theZygote
extension. A concern with the Zygote VJP implementation raised in SciML/SciMLSensitivity.jl#808 was that the underlying functions,auto_vecjac(!)
, would recompute the pullback function every time theFunctionOperator
is called by*, mul!
. I have made it so that the pullback is recomputed only whenupdate_coefficients(!)
is called with the keyword argumentVJP_input
.Tests are added in
test/test_vecjac_products.jl
to demonstrate this behaviour.