JuliaDiff / ReverseDiff.jl

Reverse Mode Automatic Differentiation for Julia
Other
348 stars 57 forks source link

Fix `vcat` method ambiguity issues on Julia 1.8 #210

Closed devmotion closed 2 years ago

devmotion commented 2 years ago

Fixes the vcat test errors due to a method ambiguity issue on Julia 1.8. These test errors are present on the master branch and show also up in other unrelated PRs.

Maybe at some point one should clean up the vcat/hcat/cat definitions, similar to https://github.com/FluxML/Tracker.jl/pull/128. But for now it seemed easier to just fix the reported method ambiguity issue.

devmotion commented 2 years ago

The test errors are known and caused by the latest release of DiffTests. I opened an issue and a PR a week ago.

mohamed82008 commented 2 years ago

Can we upper bound the version of DiffTests?

devmotion commented 2 years ago

A bit unfortunate but I guess that's probably the fastest and easiest solution for now. I also checked https://github.com/JuliaDiff/DiffTests.jl/pull/15 with this PR locally, and while it seems to fix the current issues it still fails due to some newly uncovered ambiguity issues (e.g., *(::Diagonal, ::TrackedMatrix)).

codecov-commenter commented 2 years ago

Codecov Report

Base: 85.09% // Head: 82.19% // Decreases project coverage by -2.89% :warning:

Coverage data is based on head (f5710a6) compared to base (4a50321). Patch has no changes to coverable lines.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #210 +/- ## ========================================== - Coverage 85.09% 82.19% -2.90% ========================================== Files 18 18 Lines 1811 1528 -283 ========================================== - Hits 1541 1256 -285 - Misses 270 272 +2 ``` | [Impacted Files](https://codecov.io/gh/JuliaDiff/ReverseDiff.jl/pull/210?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaDiff) | Coverage Δ | | |---|---|---| | [src/derivatives/arrays.jl](https://codecov.io/gh/JuliaDiff/ReverseDiff.jl/pull/210/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaDiff#diff-c3JjL2Rlcml2YXRpdmVzL2FycmF5cy5qbA==) | `92.85% <ø> (+1.68%)` | :arrow_up: | | [src/derivatives/broadcast.jl](https://codecov.io/gh/JuliaDiff/ReverseDiff.jl/pull/210/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaDiff#diff-c3JjL2Rlcml2YXRpdmVzL2Jyb2FkY2FzdC5qbA==) | `76.62% <0.00%> (-13.94%)` | :arrow_down: | | [src/tape.jl](https://codecov.io/gh/JuliaDiff/ReverseDiff.jl/pull/210/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaDiff#diff-c3JjL3RhcGUuamw=) | `55.55% <0.00%> (-9.03%)` | :arrow_down: | | [src/api/hessians.jl](https://codecov.io/gh/JuliaDiff/ReverseDiff.jl/pull/210/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaDiff#diff-c3JjL2FwaS9oZXNzaWFucy5qbA==) | `84.00% <0.00%> (-3.50%)` | :arrow_down: | | [src/tracked.jl](https://codecov.io/gh/JuliaDiff/ReverseDiff.jl/pull/210/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaDiff#diff-c3JjL3RyYWNrZWQuamw=) | `88.42% <0.00%> (-3.48%)` | :arrow_down: | | [src/api/tape.jl](https://codecov.io/gh/JuliaDiff/ReverseDiff.jl/pull/210/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaDiff#diff-c3JjL2FwaS90YXBlLmps) | `72.22% <0.00%> (-2.78%)` | :arrow_down: | | [src/api/utils.jl](https://codecov.io/gh/JuliaDiff/ReverseDiff.jl/pull/210/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaDiff#diff-c3JjL2FwaS91dGlscy5qbA==) | `84.84% <0.00%> (-2.06%)` | :arrow_down: | | [src/derivatives/elementwise.jl](https://codecov.io/gh/JuliaDiff/ReverseDiff.jl/pull/210/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaDiff#diff-c3JjL2Rlcml2YXRpdmVzL2VsZW1lbnR3aXNlLmps) | `77.48% <0.00%> (-1.33%)` | :arrow_down: | | [src/derivatives/linalg/reductions.jl](https://codecov.io/gh/JuliaDiff/ReverseDiff.jl/pull/210/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaDiff#diff-c3JjL2Rlcml2YXRpdmVzL2xpbmFsZy9yZWR1Y3Rpb25zLmps) | `70.31% <0.00%> (-1.30%)` | :arrow_down: | | [src/derivatives/scalars.jl](https://codecov.io/gh/JuliaDiff/ReverseDiff.jl/pull/210/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaDiff#diff-c3JjL2Rlcml2YXRpdmVzL3NjYWxhcnMuamw=) | `95.74% <0.00%> (-0.98%)` | :arrow_down: | | ... and [8 more](https://codecov.io/gh/JuliaDiff/ReverseDiff.jl/pull/210/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaDiff) | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaDiff). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaDiff)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

devmotion commented 2 years ago

As expected, with DiffTests 0.1.1 all tests pass.