Will Tebbutt
Will Tebbutt
@Red-Portal this is a really interesting failure case (I was aware that this could happen, but hadn't figured out a concrete case in which it would). I'm going to create...
So you can definitely do this using Tapir.jl's `value_and_gradient!!` interface -- the limitation in the use-case above is DifferentiationInterface.jl, rather than Tapir.jl. There's a discussion about this [here](https://github.com/gdalle/DifferentiationInterface.jl/issues/311).
Sure. Something like this: ```julia f(x, data) = dot(data, x) x = randn(10) data = randn(10) rule = Tapir.build_rrule(f, x, data) Tapir.value_and_gradient!!(rule, f, x, data) ``` should do the trick....
@Red-Portal your examples (both the abstractly-typed `data` field and using `TaskLocalRNG`s) should now both work on version 0.2.23 of Tapir.jl (the latest release).
https://github.com/TuringLang/Turing.jl/issues/2431 was previously it's own issue on the roadmap, but it looks to us like it should belong here, so we've made it a sub-issue.
Sorry, it's not clear to me what the purpose of this is. Can I see an example of what this looks like in the existing docs somewhere before we commit...