Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
penelopeysm and github-actions[bot] authored Nov 29, 2024
1 parent ce5f3a5 commit e39208f
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions test/mcmc/hmc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -330,20 +330,12 @@ using Turing
end

@testset "getstepsize: Turing.jl#2400" begin
algs = [
HMC(0.1, 10),
HMCDA(0.8, 0.75),
NUTS(0.5),
NUTS(0, 0.5),
]
algs = [HMC(0.1, 10), HMCDA(0.8, 0.75), NUTS(0.5), NUTS(0, 0.5)]
@testset "$(alg)" for alg in algs
# Construct a HMC state by taking a single step
spl = Sampler(alg, gdemo_default)
hmc_state = DynamicPPL.initialstep(
Random.default_rng(),
gdemo_default,
spl,
DynamicPPL.VarInfo(gdemo_default)
Random.default_rng(), gdemo_default, spl, DynamicPPL.VarInfo(gdemo_default)
)[2]
# Check that we can obtain the current step size
@test Turing.Inference.getstepsize(spl, hmc_state) isa Float64
Expand Down

0 comments on commit e39208f

Please sign in to comment.