From 0eee665183dbb801a686e87d630f2e169e935866 Mon Sep 17 00:00:00 2001 From: Jaime RZ Date: Thu, 3 Oct 2024 16:24:54 +0300 Subject: [PATCH] Fix Step (#359) * fix step * Update src/abstractmcmc.jl Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --------- Co-authored-by: Hong Ge <3279477+yebai@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- src/abstractmcmc.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/abstractmcmc.jl b/src/abstractmcmc.jl index 905deaf7..96ec9c7a 100644 --- a/src/abstractmcmc.jl +++ b/src/abstractmcmc.jl @@ -141,6 +141,7 @@ function AbstractMCMC.step( model::AbstractMCMC.LogDensityModel, spl::AbstractHMCSampler, state::HMCState; + n_adapts::Int = 0, kwargs..., ) # Compute transition. @@ -158,7 +159,6 @@ function AbstractMCMC.step( # Adapt h and spl. tstat = stat(t) - n_adapts = kwargs[:n_adapts] h, κ, isadapted = adapt!(h, κ, adaptor, i, n_adapts, t.z.θ, tstat.acceptance_rate) tstat = merge(tstat, (is_adapt = isadapted,))