Skip to content

Conversation

@gdalle
Copy link
Member

@gdalle gdalle commented Jun 7, 2024

DI source

For each operator, separate the method with extras and the method without. In other words,

function operator(f, b, x, extras::ExtrasType=prepare_operator(f, b, x))
   # do stuff
end

becomes

function operator(f, b, x, extras::DefaultExtrasType)
   # do stuff
end

function operator(f, b, x)
   return operator(f, b, x, prepare_operator(f, b, x)
end

This allows a more precise dispatch on DefaultExtrasType, and makes the errors more understandable to contributors when they fail to implement one of the 4 operator versions.

DI extensions

  • Fix method ambiguity in PolyesterForwardDiff for derivative

DIT source

  • Add correctness tests with and without extras (leads to significantly longer tests, especially for Tapir and symbolic backends)

@codecov-commenter
Copy link

codecov-commenter commented Jun 7, 2024

Codecov Report

Attention: Patch coverage is 83.84279% with 74 lines in your changes missing coverage. Please review.

Project coverage is 96.05%. Comparing base (0b7a2f9) to head (4c3bbb0).

Files Patch % Lines
...ferentiationInterfaceTest/src/tests/correctness.jl 77.50% 74 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #313      +/-   ##
==========================================
- Coverage   96.32%   96.05%   -0.27%     
==========================================
  Files          95       95              
  Lines        4294     4365      +71     
==========================================
+ Hits         4136     4193      +57     
- Misses        158      172      +14     

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

@gdalle gdalle merged commit 61c2741 into main Jun 7, 2024
@gdalle gdalle deleted the gd/extras branch June 7, 2024 08:41
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.

3 participants