Skip to content

Commit d62ad82

Browse files
committed
actually fix prior
1 parent 17efb8c commit d62ad82

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/mcmc/prior.jl

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,11 @@ function AbstractMCMC.step(
1212
state=nothing;
1313
kwargs...,
1414
)
15-
# TODO(DPPL0.37/penelopeysm): replace with init!! instead
16-
vi = last(
17-
DynamicPPL.evaluate!!(
18-
model, VarInfo(), DynamicPPL.SamplingContext(rng, DynamicPPL.SampleFromPrior())
19-
),
15+
# TODO(DPPL0.37/penelopeysm): replace with init!!
16+
sampling_model = DynamicPPL.contextualize(
17+
model, DynamicPPL.SamplingContext(rng, DynamicPPL.SampleFromPrior(), model.context)
2018
)
19+
_, vi = DynamicPPL.evaluate!!(sampling_model, VarInfo())
2120
# Need to manually construct the Transition here because we only
2221
# want to use the prior probability.
2322
xs = Turing.Inference.getparams(model, vi)

0 commit comments

Comments
 (0)