From 0a8ae72a37d8ffd4c17dd05f457959a2dbe96e95 Mon Sep 17 00:00:00 2001 From: Miles Lucas Date: Sat, 10 Apr 2021 15:51:15 -0500 Subject: [PATCH] make sure kwargs pass to callback --- src/sample.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sample.jl b/src/sample.jl index cbe5dc87..3bf55083 100644 --- a/src/sample.jl +++ b/src/sample.jl @@ -197,7 +197,7 @@ function mcmcsample( end # Run callback. - callback === nothing || callback(rng, model, sampler, sample, state, 1) + callback === nothing || callback(rng, model, sampler, sample, state, 1; kwargs...) # Save the sample. samples = AbstractMCMC.samples(sample, model, sampler; kwargs...) @@ -217,7 +217,7 @@ function mcmcsample( sample, state = step(rng, model, sampler, state; kwargs...) # Run callback. - callback === nothing || callback(rng, model, sampler, sample, state, i) + callback === nothing || callback(rng, model, sampler, sample, state, i; kwargs...) # Save the sample. samples = save!!(samples, sample, i, model, sampler; kwargs...)