Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Feat: adjoints through observable functions #689
Feat: adjoints through observable functions #689
Changes from 1 commit
92ad6a8
22dc7ec
0c2b69d
c61e08c
8600a8d
a69d087
785b052
adee4f0
2197a30
9172014
95cf416
4ce8257
839bd63
2474a8d
f68cb05
9ab29d9
a417cdd
ff9bb2c
032b927
44bfc91
de2d6cd
c63dfbf
940ea78
8e48f1c
d061ce4
f817b52
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Check warning on line 116 in ext/SciMLBaseZygoteExt.jl
Codecov / codecov/patch
ext/SciMLBaseZygoteExt.jl#L112-L116
Check warning on line 120 in ext/SciMLBaseZygoteExt.jl
Codecov / codecov/patch
ext/SciMLBaseZygoteExt.jl#L118-L120
Check warning on line 133 in ext/SciMLBaseZygoteExt.jl
Codecov / codecov/patch
ext/SciMLBaseZygoteExt.jl#L133
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.
Why is this removed?
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.
It was returning the
ODESolution
as the adjoint. It is also an issue because it shortcuts the gradients through parameters and instead replaces it with thesol.prob
, whereas we need to accumulate the gradients here.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.
Can you add a unit test in the downstream set which shows this is fine?
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.
Happy to. In fact, that's why I asked if anything was relying on this behavior previously. Could you suggest what kind of test you have in mind?
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 seems to be the root cause of many of the test failures? So that means it's caught by the tests already.
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.
I don't think this is what the error is referring to. I am missing a branch https://github.com/DhairyaLGandhi/RecursiveArrayTools.jl/tree/dg/noproj which removes an extra projection rule.
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.
It does refer to projecting to a
VectorOfArray
, and that rule wasn't defined forTangent
. Removing it gets us the expected results. If we want to project back to aVectorOfArray
type, then that needs to be handled elsewhere.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.
now that we have restored the adjoint, I believe this can be resolved