JuliaDiff / ForwardDiff.jl

Forward Mode Automatic Differentiation for Julia
Other
892 stars 145 forks source link

Add test of second-order derivative of `t -> abs(t)^2` #650

Closed devmotion closed 1 year ago

devmotion commented 1 year ago

This PR adds the example in https://github.com/JuliaDiff/DiffRules.jl/pull/98#issuecomment-1574420052 as a test, to avoid that upstream reintroduces this bug (DiffRules runs downstream tests of ForwardDiff).

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage has no change and project coverage change: +2.67 :tada:

Comparison is base (2263749) 86.98% compared to head (ea3a4b6) 89.65%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #650 +/- ## ========================================== + Coverage 86.98% 89.65% +2.67% ========================================== Files 10 11 +1 Lines 891 967 +76 ========================================== + Hits 775 867 +92 + Misses 116 100 -16 ``` [see 10 files with indirect coverage changes](https://app.codecov.io/gh/JuliaDiff/ForwardDiff.jl/pull/650/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=JuliaDiff)

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

andreasnoack commented 1 year ago

Any idea why we'd see these test failures?

devmotion commented 1 year ago

Not completely sure but I assume on Julia 1.9 it might just be due to different random numbers as only https://github.com/JuliaDiff/ForwardDiff.jl/actions/runs/5198679278/jobs/9375117936?pr=650#step:6:615 is failing. I don't know what's going on with nightly and the invalidations action.

devmotion commented 1 year ago

I guess the test failures were indeed random, tests on Julia 1.9 passed successfully after rerunning them.