-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
DynamicPPL.jl/ext/DynamicPPLMCMCChainsExt.jl
Lines 176 to 188 in ffc4623
| function reevaluate_with_chain( | |
| rng::Random.AbstractRNG, | |
| model::DynamicPPL.Model, | |
| chain::MCMCChains.Chains, | |
| accs::NTuple{N,DynamicPPL.AbstractAccumulator}, | |
| fallback::Union{DynamicPPL.AbstractInitStrategy,Nothing}=nothing, | |
| ) where {N} | |
| params_with_stats = AbstractMCMC.to_samples(DynamicPPL.ParamsWithStats, chain) | |
| vi = DynamicPPL.OnlyAccsVarInfo(DynamicPPL.AccumulatorTuple(accs)) | |
| return map(params_with_stats) do ps | |
| DynamicPPL.init!!(rng, model, vi, DynamicPPL.InitFromParams(ps.params, fallback)) | |
| end | |
| end |
The outputs of this map are obviously independent (unless they happen to mutate a global value?) - so could we parallelise this?
Metadata
Metadata
Assignees
Labels
No labels