We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 17efb8c commit d62ad82Copy full SHA for d62ad82
src/mcmc/prior.jl
@@ -12,12 +12,11 @@ function AbstractMCMC.step(
12
state=nothing;
13
kwargs...,
14
)
15
- # TODO(DPPL0.37/penelopeysm): replace with init!! instead
16
- vi = last(
17
- DynamicPPL.evaluate!!(
18
- model, VarInfo(), DynamicPPL.SamplingContext(rng, DynamicPPL.SampleFromPrior())
19
- ),
+ # TODO(DPPL0.37/penelopeysm): replace with init!!
+ sampling_model = DynamicPPL.contextualize(
+ model, DynamicPPL.SamplingContext(rng, DynamicPPL.SampleFromPrior(), model.context)
20
+ _, vi = DynamicPPL.evaluate!!(sampling_model, VarInfo())
21
# Need to manually construct the Transition here because we only
22
# want to use the prior probability.
23
xs = Turing.Inference.getparams(model, vi)
0 commit comments