@@ -179,9 +179,9 @@ function mcmcsample(
179179 # Obtain the initial sample and state.
180180 sample, state = if num_warmup > 0
181181 if initial_state === nothing
182- step_warmup (rng, model, sampler; kwargs... )
182+ step_warmup (rng, model, sampler; num_warmup, kwargs... )
183183 else
184- step_warmup (rng, model, sampler, initial_state; kwargs... )
184+ step_warmup (rng, model, sampler, initial_state; num_warmup, kwargs... )
185185 end
186186 else
187187 if initial_state === nothing
@@ -202,7 +202,7 @@ function mcmcsample(
202202 for j in 1 : discard_initial
203203 # Obtain the next sample and state.
204204 sample, state = if j ≤ num_warmup
205- step_warmup (rng, model, sampler, state; kwargs... )
205+ step_warmup (rng, model, sampler, state; num_warmup, kwargs... )
206206 else
207207 step (rng, model, sampler, state; kwargs... )
208208 end
@@ -229,7 +229,7 @@ function mcmcsample(
229229 for _ in 1 : (thinning - 1 )
230230 # Obtain the next sample and state.
231231 sample, state = if i ≤ keep_from_warmup
232- step_warmup (rng, model, sampler, state; kwargs... )
232+ step_warmup (rng, model, sampler, state; num_warmup, kwargs... )
233233 else
234234 step (rng, model, sampler, state; kwargs... )
235235 end
@@ -244,7 +244,7 @@ function mcmcsample(
244244
245245 # Obtain the next sample and state.
246246 sample, state = if i ≤ keep_from_warmup
247- step_warmup (rng, model, sampler, state; kwargs... )
247+ step_warmup (rng, model, sampler, state; num_warmup, kwargs... )
248248 else
249249 step (rng, model, sampler, state; kwargs... )
250250 end
@@ -328,9 +328,9 @@ function mcmcsample(
328328 # Obtain the initial sample and state.
329329 sample, state = if num_warmup > 0
330330 if initial_state === nothing
331- step_warmup (rng, model, sampler; kwargs... )
331+ step_warmup (rng, model, sampler; num_warmup, kwargs... )
332332 else
333- step_warmup (rng, model, sampler, initial_state; kwargs... )
333+ step_warmup (rng, model, sampler, initial_state; num_warmup, kwargs... )
334334 end
335335 else
336336 if initial_state === nothing
@@ -344,7 +344,7 @@ function mcmcsample(
344344 for j in 1 : discard_initial
345345 # Obtain the next sample and state.
346346 sample, state = if j ≤ num_warmup
347- step_warmup (rng, model, sampler, state; kwargs... )
347+ step_warmup (rng, model, sampler, state; num_warmup, kwargs... )
348348 else
349349 step (rng, model, sampler, state; kwargs... )
350350 end
@@ -364,15 +364,15 @@ function mcmcsample(
364364 for _ in 1 : (thinning - 1 )
365365 # Obtain the next sample and state.
366366 sample, state = if i ≤ keep_from_warmup
367- step_warmup (rng, model, sampler, state; kwargs... )
367+ step_warmup (rng, model, sampler, state; num_warmup, kwargs... )
368368 else
369369 step (rng, model, sampler, state; kwargs... )
370370 end
371371 end
372372
373373 # Obtain the next sample and state.
374374 sample, state = if i ≤ keep_from_warmup
375- step_warmup (rng, model, sampler, state; kwargs... )
375+ step_warmup (rng, model, sampler, state; num_warmup, kwargs... )
376376 else
377377 step (rng, model, sampler, state; kwargs... )
378378 end
0 commit comments