Skip to content

Conversation

Red-Portal
Copy link
Member

No description provided.

@Red-Portal Red-Portal requested a review from penelopeysm August 13, 2025 17:53
@Red-Portal
Copy link
Member Author

Red-Portal commented Aug 13, 2025

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()))
Copy link
Member

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 :)

Copy link
Member Author

@Red-Portal Red-Portal Aug 13, 2025

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!

Copy link
Contributor

SliceSampling.jl documentation for PR #42 is available at:
https://TuringLang.github.io/SliceSampling.jl/previews/PR42/

Red-Portal and others added 2 commits August 13, 2025 14:02
`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>
Copy link

codecov bot commented Aug 13, 2025

Codecov Report

❌ Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.52%. Comparing base (61ab9f6) to head (fd30281).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
ext/SliceSamplingTuringExt.jl 33.33% 2 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Red-Portal and others added 3 commits August 13, 2025 18:27
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@Red-Portal Red-Portal merged commit 3704672 into main Aug 13, 2025
8 checks passed
@Red-Portal Red-Portal deleted the bump_turing_v0.40 branch August 13, 2025 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants