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.
sample!!
1 parent ba34461 commit b92280dCopy full SHA for b92280d
src/extract_priors.jl
@@ -116,8 +116,7 @@ function extract_priors(rng::Random.AbstractRNG, model::Model)
116
# workaround for the fact that `order` is still hardcoded in VarInfo, and hence you
117
# can't push new variables without knowing the num_produce. Remove this when possible.
118
varinfo = setaccs!!(varinfo, (PriorDistributionAccumulator(), NumProduceAccumulator()))
119
- new_model = contextualize(model, SamplingContext(rng, model.context))
120
- varinfo = last(evaluate!!(new_model, varinfo))
+ varinfo = last(sample!!(rng, model, varinfo))
121
return getacc(varinfo, Val(:PriorDistributionAccumulator)).priors
122
end
123
0 commit comments