Conversation
Codecov Report
@@ Coverage Diff @@
## main #243 +/- ##
==========================================
+ Coverage 90.75% 91.15% +0.39%
==========================================
Files 11 12 +1
Lines 303 339 +36
==========================================
+ Hits 275 309 +34
- Misses 28 30 +2
Continue to review full report at Codecov.
|
oxinabox
left a comment
There was a problem hiding this comment.
should this try and use a rrule/frule first then only fallback to using the FiniteDifferences if that returns nothing?
Do we ever want to avoid using the rule and make sure to use FD for the inner rule? I don't think so. I think this means we can just combine the |
Yeah, I guess so.
It is, because people use it directly. Don't they? |
| test_frule(config, outer, inner, rand(); frule_f=frule_via_ad, check_inferred=false) | ||
| end | ||
|
|
||
| @testset "Catch incorrect rules" begin |
There was a problem hiding this comment.
@oxinabox FYI there was actually a gross bug in the original implementation.
This TestConfig will be used to test rules for higher order functions f(inner, array) where we don't care that much for the rule for inner and want to do finite differencing for it out of convenience.
However, if we don't check whether a rule exists inside f/rrule_via_ad using the TestConfig, we are actually ignoring the outer rule implementation (for f) entirely, and always pass the tests because finite differencing is done on the outer rule 😅
I will wait for you to reply before merging since this was a significant development (even if not a significant change to the code)
Co-authored-by: Frames Catherine White <oxinabox@ucc.asn.au>
Closes #241 and #221