-
Notifications
You must be signed in to change notification settings - Fork 221
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
MethodError matching getϵ for AdvancedHMC Adaption #2400
Comments
Hi @gjgress! The issue is the call to Lines 250 to 251 in f3b2476
The issue is when you use Lines 540 to 546 in f3b2476
and using Turing
ENV["JULIA_DEBUG"] = "Turing"
@model f() = x ~ Normal()
model = f()
sample(model, NUTS(0, 0.25), 10) A quick fix for you would be to define this method somewhere in your code: using Turing
using AdvancedHMC.Adaptation: NoAdaptation
function Turing.Inference.getstepsize(
sampler::DynamicPPL.Sampler{<:Turing.Inference.AdaptiveHamiltonian},
state::Turing.Inference.HMCState{TV,TKernel,THam,PhType,NoAdaptation}
) where {TV,TKernel,THam,PhType}
return state.kernel.τ.integrator.ϵ
end And on our end the fix would be to include that method so that you don't need to define it, although a fix probably won't land until next week. |
@penelopeysm Ohh, thanks! Good catch. In hindsight I should have noticed the change appearing when I started running sampling with no burn-ins. I wish I could contribute, but it looks like you all already have things taken care of. Appreciate the quick solution too. |
No problem! Your example was already really useful. Thanks for reporting :) This fix was so small I didn't think to ask about whether you might want to do the PR, sorry 😅 I'll remember next time! |
Minimal working example
Description
I'm getting a warning during my sampling with Turing, and I'm not sure if it's an artifact of using Logging/LoggingExtras with Turing, an actual issue with my sampling, or a bug in Turing. It occurs pretty much every sample. I couldn't find any info on it online either. Does anyone have any guidance on where this might be coming from?
Also perhaps worth noting is that the julia instance eventually is killed, due to running out of memory. I'm not sure if that's also because of this or because the message itself is logged so many times.
Full disclosure: the MWE I gave isn't a true MWE, namely I can't invest the time to write a MWE ensemble problem with StochasticDiffEqs, so I just left the blackbox
ensemblesimulate()
function instead. I don't think this is relevant to the error I'm getting, but I do apologize because it does make it harder to test with the MWE.Julia version info
versioninfo()
Manifest
]st --manifest
The text was updated successfully, but these errors were encountered: