Skip to content

Commit b92280d

Browse files
committed
use sample!!
1 parent ba34461 commit b92280d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/extract_priors.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,7 @@ function extract_priors(rng::Random.AbstractRNG, model::Model)
116116
# workaround for the fact that `order` is still hardcoded in VarInfo, and hence you
117117
# can't push new variables without knowing the num_produce. Remove this when possible.
118118
varinfo = setaccs!!(varinfo, (PriorDistributionAccumulator(), NumProduceAccumulator()))
119-
new_model = contextualize(model, SamplingContext(rng, model.context))
120-
varinfo = last(evaluate!!(new_model, varinfo))
119+
varinfo = last(sample!!(rng, model, varinfo))
121120
return getacc(varinfo, Val(:PriorDistributionAccumulator)).priors
122121
end
123122

0 commit comments

Comments
 (0)