-
Notifications
You must be signed in to change notification settings - Fork 3
Bump Turing v0.40 #42
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
Conversation
Hi @penelopeysm , could you take a quick look to make sure everything is as intended upstream? |
# end | ||
|
||
function SliceSampling.initial_sample(rng::Random.AbstractRNG, ℓ::Turing.LogDensityFunction) | ||
model = ℓ.model | ||
vi = Turing.DynamicPPL.VarInfo(rng, model, Turing.SampleFromUniform()) | ||
vi_spl = last(Turing.DynamicPPL.evaluate!!(model, rng, vi, Turing.SampleFromUniform())) | ||
θ = vi_spl[:] | ||
vi_spl = last(Turing.DynamicPPL.evaluate_and_sample!!(rng, model, vi, Turing.SampleFromUniform())) |
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.
Hmmm this will only work on DynamicPPL 0.37, so only Turing 0.40, so I think it might be better to restrict the compat to only 0.40.
Alternatively to be explicit you could make both Turing and DynamicPPL triggers for the Turing extension, then that way you can control both compat entries. I think that's the best way although it is a bit of boilerplate.
Otherwise LGTM :)
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.
Ah okay. Hmm let me just restrict to Turing 0.40 to keep things simple. Thanks for taking a look!
SliceSampling.jl documentation for PR #42 is available at: |
`Turing.DynamicPPL.evaluate_and_sample!!` is only available on DynamicPPL v0.37, which is re-exported only on Turing v0.40.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #42 +/- ##
==========================================
+ Coverage 93.98% 94.52% +0.54%
==========================================
Files 10 10
Lines 349 347 -2
==========================================
Hits 328 328
+ Misses 21 19 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
No description provided.