Skip to content

Commit 064dccb

Browse files
committed
That was a mistake; use getlogdensity instead of hardcoding the function
1 parent 4c693c7 commit 064dccb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/SliceSamplingTuringExt.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function SliceSampling.initial_sample(rng::Random.AbstractRNG, ℓ::Turing.LogDe
4242
vi_spl = last(
4343
Turing.DynamicPPL.init!!(rng, model, vi, Turing.DynamicPPL.InitFromUniform())
4444
)
45-
ℓp = Turing.DynamicPPL.getlogjoint_internal(vi_spl)
45+
ℓp = .getlogdensity(vi_spl)
4646

4747
init_attempt_count = 1
4848
for attempts in 1:n_max_attempts
@@ -52,7 +52,7 @@ function SliceSampling.initial_sample(rng::Random.AbstractRNG, ℓ::Turing.LogDe
5252

5353
# NOTE: This will sample in the unconstrained space if ℓ.varinfo is linked
5454
vi_spl = last(Turing.DynamicPPL.init!!(rng, model, vi, Turing.InitFromUniform()))
55-
ℓp = Turing.DynamicPPL.getlogjoint_internal(vi_spl)
55+
ℓp = .getlogdensity(vi_spl)
5656
θ = vi_spl[:]
5757

5858
if all(isfinite.(θ)) && isfinite(ℓp)

0 commit comments

Comments
 (0)