From dc2d7986d15703bc9895f63114d6f06f2bb973c9 Mon Sep 17 00:00:00 2001 From: jaimerz Date: Fri, 3 Nov 2023 09:18:18 +0000 Subject: [PATCH 1/2] fix step --- src/abstractmcmc.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/abstractmcmc.jl b/src/abstractmcmc.jl index 905deaf7..b55d13cf 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,)) From 1870f179f47aca6840f6078e6d6f128959be102c Mon Sep 17 00:00:00 2001 From: Hong Ge <3279477+yebai@users.noreply.github.com> Date: Fri, 3 Nov 2023 12:29:51 +0000 Subject: [PATCH 2/2] Update src/abstractmcmc.jl 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 b55d13cf..96ec9c7a 100644 --- a/src/abstractmcmc.jl +++ b/src/abstractmcmc.jl @@ -141,7 +141,7 @@ function AbstractMCMC.step( model::AbstractMCMC.LogDensityModel, spl::AbstractHMCSampler, state::HMCState; - n_adapts::Int=0, + n_adapts::Int = 0, kwargs..., ) # Compute transition.