Open torfjelde opened 9 months ago
@devmotion @yebai thoughts?
I don't think we need resume_from
anymore.
Yes, I think it's redundant and confusing, now that initial_state
is an official AbstractMCMC keyword argument.
I see #2115 did something on this, but it doesn't seem to be "complete", e.g.
is hit when resume_from === nothing
which will be the case even if the user specifies initial_state
.
I was looking at the DynamicPPL codebase for unrelated reasons and thought to myself that this resume_from
seemed very unnecessary.
I'll work on a PR to get rid of it.
AbstractMCMC@5 has
initial_state
as a mechanism to "resume" a chain.This then begs the question: do we even need
resume_from
that is present in many sampler impls in Turing.jl?https://github.com/TuringLang/Turing.jl/blob/39f5d5bb7fbf1607e073025a36688f1ed336e9d2/src/mcmc/hmc.jl#L92-L93
AFAIK the only place
resume_from
is actually overloaded is forChains
:https://github.com/TuringLang/DynamicPPL.jl/blob/ff68206d4b34e230c7e444e91fc60297dd5a5bd0/ext/DynamicPPLMCMCChainsExt.jl#L18-L27
IMO we should replace this with a simple
getstate
or something fromChains
and then just useinitial_state
everywhere to stay consistent with theAbstractMCMC
interface.