Skip to content
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

Test ForwardDiff over ReverseDiff #386

Merged
merged 4 commits into from
Jul 28, 2024
Merged

Test ForwardDiff over ReverseDiff #386

merged 4 commits into from
Jul 28, 2024

Conversation

gdalle
Copy link
Member

@gdalle gdalle commented Jul 28, 2024

DI extensions

DI tests

  • Add tests for SecondOrder(AutoForwardDiff(), AutoReverseDiff())
  • Add static array tests for AutoReverseDiff()

Caution

Without the extension modification, the new tests fail on the primal value y = f(x) when it comes from value_and_gradient!(f, ::AutoReverseDiff, x). My best guess for the culprit is the bad use of DiffResults inside ReverseDiff (JuliaDiff/ReverseDiff.jl#251). Funnily enough, the tests succeed if I add a println statement in said function, which is very disturbing (see Discourse on the side effects of println).

@codecov-commenter
Copy link

codecov-commenter commented Jul 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.49%. Comparing base (9b46c79) to head (7f5528d).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #386      +/-   ##
==========================================
- Coverage   96.58%   94.49%   -2.10%     
==========================================
  Files         101      101              
  Lines        4926     4921       -5     
==========================================
- Hits         4758     4650     -108     
- Misses        168      271     +103     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gdalle gdalle merged commit 1c35de5 into main Jul 28, 2024
51 checks passed
@gdalle gdalle deleted the gd/test_forrev branch July 28, 2024 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants