Skip to content

Commit

Permalink
make sure kwargs pass to callback
Browse files Browse the repository at this point in the history
  • Loading branch information
mileslucas committed Apr 10, 2021
1 parent a182954 commit 0a8ae72
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sample.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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...)
Expand All @@ -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...)
Expand Down

0 comments on commit 0a8ae72

Please sign in to comment.