Description
Lines 1 to 19 in 0810e14
DynamicPPL.jl/src/context_implementations.jl
Lines 212 to 260 in 0810e14
This is all kinda hacky and also confusing since SampleFromPrior
doesn't actually sample if haskey(vi, vn)
(but it's hard to see why! - if haskey(vi, vn)
, but sampler isa SampleFromPrior
, the second if doesn't fire and we just get r = vi[vn, dist]
)
It should be cleaned up and the behaviour made more consistent. Also the comment about using Sampler{Prior}
and Sampler{Uniform}
IMO makes a lot of sense. Note, this could have further impacts on Turing.jl because there is some SampleFromPrior
/ SampleFromUniform
type piracy there. Also it might have an effect on the implementation of TuringLang/Turing.jl#2476.