-
Notifications
You must be signed in to change notification settings - Fork 89
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 errors revealed by Zygote's tests #175
Conversation
Seems unlikely. Note this issue on FiniteDifferences. This PR aims to fix it. |
Ok this is ready for review though it needs the fix in TestUtils before tests will run |
Once we have JuliaDiff/ChainRulesTestUtils.jl#25 |
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.
Once test pass, LGTM
# TODO: Assert about the primal type in the Composite, It should be Diagonal | ||
# infact it should be exactly the type of `Diagonal(d)` | ||
# but right now Zygote loses primal type information so we can't use it. | ||
# See https://github.com/FluxML/Zygote.jl/issues/603 |
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 am confused by this: how do we end up with a Composite
but not a Composite{P}
for the correct P
?
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.
Because in the Zygote PR we turn all NamedTuples
into Composite{Any}
Cross referencing this -- I'm not sure why |
Co-Authored-By: Nick Robinson <[email protected]>
Found these because of Zygote's tests
while working on FluxML/Zygote.jl#366
It is hard to add tests for them because they are about testing that
we didn't define a rule we should not have,
and that we don't thunk to many times