Skip to content

Commit

Permalink
Fix Step (#359)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Oct 3, 2024
1 parent 2b3814c commit 0eee665
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/abstractmcmc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ function AbstractMCMC.step(
model::AbstractMCMC.LogDensityModel,
spl::AbstractHMCSampler,
state::HMCState;
n_adapts::Int = 0,
kwargs...,
)
# Compute transition.
Expand All @@ -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,))

Expand Down

0 comments on commit 0eee665

Please sign in to comment.