File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -464,7 +464,12 @@ function setparams_varinfo!!(
464464 model:: DynamicPPL.Model , :: MH , state:: AbstractVarInfo , params:: AbstractVarInfo
465465)
466466 # Setting `params` into `state` really just means using `params` itself, but we
467- # need to update the logprob.
467+ # need to update the logprob. We also need to be a bit more careful, because
468+ # the `state` here carries a VAIMAcc, which is needed for the MH step() function
469+ # but may not be present in `params`. So we need to make sure that the value
470+ # we return from this function also has a VAIMAcc which corresponds to the
471+ # values in `params`.
472+ params = DynamicPPL. setacc!! (params, DynamicPPL. ValuesAsInModelAccumulator (false ))
468473 return last (DynamicPPL. evaluate!! (model, params))
469474end
470475
You can’t perform that action at this time.
0 commit comments