-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes to AD backend usage in externalsampler
#2223
Conversation
@yebai @devmotion @sunxd3 this should be a quick merge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me
Had to disable a few tests for EDIT: Tests should be passing now though, so if people are happy with the above, then we're gucci. |
Uhmm the test failures seem very strange o.O I cannot reproduce this on my own machine; it's not windows, but I can't see how we can get EDIT: I lied 🤦 Was using the incorrect branch locally.. |
It seems to be the same issue as JuliaFolds2/BangBang.jl#21 but we're using the correct version of BangBang.jl, indicating that the fix I did in JuliaFolds2/BangBang.jl#22 did not cover ReverseDiff.jl for some reason (though I'm also confused as to why we haven't caught this before). |
Okay, so now this PR should be passing. Disabled the test as mentioned in TuringLang/DynamicPPL.jl#612. Once those tests have passed, this should be good to go. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2223 +/- ##
======================================
Coverage 0.00% 0.00%
======================================
Files 22 22
Lines 1528 1529 +1
======================================
- Misses 1528 1529 +1 ☔ View full report in Codecov by Sentry. |
Pull Request Test Coverage Report for Build 9140038894Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
I was playing around with an implementation of AutoMALA (see https://arxiv.org/abs/2310.16782 and Pigeons.jl) using AbstractMCMC.jl for a presentation I'm doing on Turing.jl-related stuff, and I ran into some issues with
externalsampler
.Specifically, somewhere along the way, a
LogDensityProblemsAD.ADgradient(...)
of aDynamicPPL.LogDensityModel
becomes just aDynamicPPL.LogDensityModel
, i.e. we lose the ability to compute gradients.We didn't catch this in our tests because we both AbstractHMC.jl and AbstractMH.jl default to using
ForwardDiff
if needed, and so they would use the correctadtype
in the very first iteration and then subsequently switch to using their own defaults :upside_down_smiley: