Closed devmotion closed 2 years ago
Base: 85.16% // Head: 81.24% // Decreases project coverage by -3.92%
:warning:
Coverage data is based on head (
088182c
) compared to base (8ac1f7d
). Patch coverage: 58.06% of modified lines in pull request are covered.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
Bump :slightly_smiling_face:
It would be good to fix ReverseDiff such that we can move forward with https://github.com/JuliaDiff/DiffRules.jl/pull/79.
Sorry for the delay, been swamped recently. I will take a look tonight.
Ah the methods are defined a bit further in the same file, nevermind.
This PR fixes some problems with the DiffRules integration and its tests. It is needed for https://github.com/JuliaDiff/DiffRules.jl/pull/79 (relevant DiffRules tests pass with that PR).
Mainly, the PR
NaN
comparisons to the tests (necessary since in DiffRules undefined and non-existing derivatives are implemented asNaN
and hence otherwise comparisons with ForwardDiff will fail if both returnNaN
)NaN
the ForwardDiff results of both approaches are different for the derivative of the other argument, one will beNaN
and one might not)map
/broadcast
ing of DiffRules as currently internally derivatives are computed with ForwardDiff always for both arguments, even if only one is tracked (this was uncovered by the changes to the tests mentioned above and it ensures that derivatives of functions where derivatives are defined only for one argument return non-NaN
results, as in ForwardDiff)TheEdit: Fixed on the master branch,vcat
test error is unrelated and also present on the master branch and other PRs.I also assume we could do better than ForwardDiff here and also avoid that all results become
NaN
if derivatives are computed with respect to both arguments and only one is defined/exists. But replacing ForwardDiff with a direct implementation of the DiffRules-derivatives seemed to require much larger changes, and I tried to apply only a somewhat minimal set of changes required for https://github.com/JuliaDiff/DiffRules.jl/pull/79.