Skip to content

Commit 465bef6

Browse files
committed
Remove resume_from
See TuringLang/Turing.jl#2171
1 parent dea62bb commit 465bef6

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/sampler.jl

+9-2
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,17 @@ function AbstractMCMC.sample(
100100
sampler::Sampler,
101101
N::Integer;
102102
chain_type=default_chain_type(sampler),
103-
resume_from=nothing,
104-
initial_state=loadstate(resume_from),
103+
initial_state=nothing,
105104
kwargs...,
106105
)
106+
if haskey(kwargs, :resume_from)
107+
throw(
108+
ArgumentError(
109+
"The `resume_from` keyword argument is no longer supported. Please use `initial_state=loadstate(chain)` instead of `resume_from=chain`.",
110+
),
111+
)
112+
end
113+
107114
return AbstractMCMC.mcmcsample(
108115
rng, model, sampler, N; chain_type, initial_state, kwargs...
109116
)

0 commit comments

Comments
 (0)