Add Turing integration tests (and more Bijectors tests)#2863
Add Turing integration tests (and more Bijectors tests)#2863wsmoses merged 8 commits intoEnzymeAD:mainfrom
Conversation
|
Your PR no longer requires formatting changes. Thank you for your contribution! |
| adtypes = ( | ||
| AutoEnzyme(; mode = Enzyme.set_runtime_activity(Enzyme.Forward), function_annotation = Enzyme.Const), | ||
| AutoEnzyme(; mode = Enzyme.set_runtime_activity(Enzyme.Reverse), function_annotation = Enzyme.Const), | ||
| ) |
There was a problem hiding this comment.
once TuringLang/DynamicPPL.jl#1172 is in it shouldn't need Const.
|
1.10 tests fail |
|
Took a while to get through the sea of Gibbs sampler code. I've posted a minimiser in an issue, but I also think TuringLang/DynamicPPL.jl#1188 should fix it too. Will push a new commit when that's released! |
|
Updated DynamicPPL version; tests on Julia 1.10 work locally for me now. |
|
@wsmoses CI passed on the previous commit (at least for the Turing tests; I assume the Comrade tests are not mine to fix 🙂) |
|
its all green! one minor thing, in the bijectors tests where we set runtime activity to true, can we first check test_throws EnzymeRuntimeActivityError for that case [that way we confirm its required] |
|
Good idea, done that! I also updated the Turing tests since we changed it to not need a closure and hence doesn't need Const |
|
I reckon that should all be fine now, tested locally too with both versions 😅 |
Merry Christmas! 🙂
So, I've gotten the AD tests in Turing CI to work with Enzyme. This PR essentially contains a duplicate of those tests. #2528
I haven't timed this exact set of tests but I believe it should take around 15-20 minutes on a GitHub runner.
I would mention that Turing/DynamicPPL exclusively use Enzyme via DI. I could rewrite the first testset to use Enzyme directly without too much faff, but the second one would be very annoying to rewrite and would involve a lot of Turing internals, so I hope that this is okay.
Separately, Bijectors had some tests that used to fail, but this seems to have been fixed recently (I didn't investigate which patch fixed it), so I've added some of those tests here too.