It has very little to do with Turing, it's just a thin wrapper around another sampler. I am fairly sure it should go into AbstractMCMC (or a package that depends only on AbstractMCMC) and the only thing that needs to be kept here are these two methods:
|
function RepeatSampler(alg::InferenceAlgorithm, num_repeat::Int) |
|
return RepeatSampler(Sampler(alg), num_repeat) |
|
end |
|
|
|
function setparams_varinfo!!(model::DynamicPPL.Model, sampler::RepeatSampler, state, params) |
|
return setparams_varinfo!!(model, sampler.sampler, state, params) |
|
end |
although if we remove DynamicPPL.Sampler (TuringLang/DynamicPPL.jl#1037) then even the first one can go too.
It has very little to do with Turing, it's just a thin wrapper around another sampler. I am fairly sure it should go into AbstractMCMC (or a package that depends only on AbstractMCMC) and the only thing that needs to be kept here are these two methods:
Turing.jl/src/mcmc/repeat_sampler.jl
Lines 27 to 33 in 296f654
although if we remove
DynamicPPL.Sampler(TuringLang/DynamicPPL.jl#1037) then even the first one can go too.