Conversation
|
@Technici4n I'd love to have some feedback on this, and the related chalk-lab/Mooncake.jl#548 it enables! |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #975 +/- ##
==========================================
+ Coverage 94.11% 95.89% +1.78%
==========================================
Files 135 131 -4
Lines 7980 7999 +19
==========================================
+ Hits 7510 7671 +161
+ Misses 470 328 -142
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I'm not very familiar with contexts but the basic idea sounds reasonable. Why is the nan poisoning only used now and wasn't previously? Does this PR introduce a new kind of context? |
|
The idea behind contexts is summed up concisely in https://juliadiff.org/DifferentiationInterface.jl/DifferentiationInterface/stable/explanation/arguments/. |
Partial fix for #806, #675.
Since DI doesn't compute derivatives with respect to contexts, in each implementation we need a way to mark the derivative as unknown.
DifferentiateWithwith acontext_wrappersfield, denoting how additional arguments beyondxmust be taken into account.ChainRulesCore.@not_implementedtangentFDataandRDataof context arguments usingNaNConstantcontext containingDuals would make the derivative wrong. We could allowCaches though.frule!!doesn't yet exist forDifferentiateWith