@@ -67,19 +67,6 @@ function AbstractMCMC.step(
6767 return vi, nothing
6868end
6969
70- function default_varinfo (rng:: Random.AbstractRNG , model:: Model , sampler:: AbstractSampler )
71- return default_varinfo (rng, model, sampler, DefaultContext ())
72- end
73- function default_varinfo (
74- rng:: Random.AbstractRNG ,
75- model:: Model ,
76- sampler:: AbstractSampler ,
77- context:: AbstractContext ,
78- )
79- init_sampler = initialsampler (sampler)
80- return VarInfo (rng, model, init_sampler, context)
81- end
82-
8370function AbstractMCMC. sample (
8471 rng:: Random.AbstractRNG ,
8572 model:: Model ,
@@ -95,12 +82,15 @@ function AbstractMCMC.sample(
9582 )
9683end
9784
98- # initial step: general interface for resuming and
85+ # This function handles the initial step in the AbstractMCMC interface for all
86+ # samplers (except SampleFromUniform and SampleFromPrior). The subsequent steps
87+ # are implemented individually for each sampler as they depend on the sampler
88+ # state.
9989function AbstractMCMC. step (
10090 rng:: Random.AbstractRNG , model:: Model , spl:: Sampler ; initial_params= nothing , kwargs...
10191)
10292 # Sample initial values.
103- vi = default_varinfo (rng, model, spl)
93+ vi = VarInfo (rng, model, initialsampler ( spl), DefaultContext () )
10494
10595 # Update the parameters if provided.
10696 if initial_params != = nothing
0 commit comments