-
-
Notifications
You must be signed in to change notification settings - Fork 40
Fix for #95 #96
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 for #95 #96
Conversation
|
|
||
| reverse = ReverseDiff.gradient(ca -> F_(ca), ca).x | ||
| if F_ in (F_idx_val, F_idx_sym) | ||
| @test_broken reverse ≈ truth |
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.
Produces a zero-vector rather than truth. Guessing there's something wrong with src/compat/reversediff.jl but I haven't investigated this further.
Codecov Report
@@ Coverage Diff @@
## master #96 +/- ##
==========================================
+ Coverage 70.95% 74.10% +3.15%
==========================================
Files 20 19 -1
Lines 599 587 -12
==========================================
+ Hits 425 435 +10
+ Misses 174 152 -22
Continue to review full report at Codecov.
|
|
Thanks for this! I'm glad you caught that ReverseDiff issue. ReverseDiff support is pretty new for ComponentArrays, so it will be good to have better tests for that. I'll figure out what's going wrong with it. Yes, I agree that ChainRulesCore should be a direct dependency. I've been meaning to move some of the low-dependency packages like this out of Requires and into direct dependencies. No, there's no reason Manifest is being used in Also, I'll try to track down why this failing for v1.2 and nightly. I guess it's not a huge deal if we need to drop support for v1.2, but ideally I'd like to keep it if at all possible. |
|
Oh, nevermind on the v1.2 thing. That's only failing now because the Zygote tests (which were broken before on v1.2) are running again. I'll put a |
|
Also, the nightly thing looks like it has to do with this, so I'm not worried about that either. |
|
Good stuff!:) |
This PR fixes #95 and removes the now redundant Zygote.jl-specific rules in favour of ChainRules.jl-only.
In the process I also improved the testing for AD a bit and noticed that ReverseDiff.jl will silently compute the wrong gradient when using
getindex. I've currently just marked these cases as broken.Also, IMO ChainRulesCore.jl should just be a direct dependency so compat-bounds can be added. #95 likely would have been avoided if that was the case, though I realize at the time of impl this might not have made as much sense.
EDIT: Also, is there a reason why Manifest.toml is used in
test/? Maybe this should also be removed in favour of compat-bounds intest/Project.toml?