Skip to content

Conversation

@penelopeysm
Copy link
Member

No description provided.

vi = Turing.DynamicPPL.VarInfo(rng, model, Turing.SampleFromUniform())
vi_spl = last(Turing.DynamicPPL.evaluate_and_sample!!(rng, model, vi, Turing.SampleFromUniform()))
θ = vi_spl[:]
ℓp = LogDensityProblems.logdensity(ℓ, θ)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

calling logdensity leads to an extra model evaluation, we can skip this by using the logjoint which is already in the varinfo

@codecov
Copy link

codecov bot commented Oct 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.29%. Comparing base (837fe07) to head (cb9ebb4).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #44      +/-   ##
==========================================
- Coverage   96.30%   96.29%   -0.02%     
==========================================
  Files          10       10              
  Lines         352      351       -1     
==========================================
- Hits          339      338       -1     
  Misses         13       13              

☔ 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.

@github-actions
Copy link
Contributor

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

Comment on lines 26 to +28
uses: TuringLang/actions/DocsDocumenter@main
with:
julia-version: 1.11
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the docs example uses PG, which doesn't work on 1.12 so this has to be pinned for now

Copy link
Member

@Red-Portal Red-Portal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @penelopeysm , thanks for the PR. Everything looks good. One quick thing though, could you update the docstring here, which seems outdated now that we have a more explicit way to initialize the parameters?

@penelopeysm
Copy link
Member Author

Thanks @Red-Portal! I just deleted it because initial params are now always in unlinked space so there's no possibility of the params being different from what the user specified. I think. Does slice sampling require linked VarInfo / unconstrained parameters?

@Red-Portal
Copy link
Member

@penelopeysm thanks for the update. All looks good to me now.

Does slice sampling require linked VarInfo / unconstrained parameters?

Except for bounded supports, in general, yes.

@penelopeysm
Copy link
Member Author

Neat, okay. There might be some upcoming changes to the external sampler interface, but it will be a while. I'll check back again when those land!

@Red-Portal Red-Portal merged commit e6d94cc into main Oct 24, 2025
8 checks passed
@Red-Portal Red-Portal deleted the py/041 branch October 24, 2025 14: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.

3 participants