We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 406c2ad commit c86a34eCopy full SHA for c86a34e
test/mcmc/hmc.jl
@@ -329,6 +329,25 @@ using Turing
329
@test pvalue(ApproximateTwoSampleKSTest(vec(results), vec(results_prior))) > 0.001
330
end
331
332
+ @testset "getstepsize: Turing.jl#2400" begin
333
+ algs = [
334
+ HMC(0.1, 10),
335
+ HMCDA(0.8, 0.75),
336
+ NUTS(0.5),
337
+ NUTS(0, 0.5),
338
+ ]
339
+ @testset "$(alg)" for alg in algs
340
+ spl = Sampler(alg, gdemo_default)
341
+ hmc_state = DynamicPPL.initialstep(
342
+ Random.default_rng(),
343
+ gdemo_default,
344
+ spl,
345
+ DynamicPPL.VarInfo(gdemo_default)
346
+ )[2]
347
+ @test Turing.Inference.getstepsize(spl, hmc_state) isa Float64
348
+ end
349
350
+
351
@testset "Check ADType" begin
352
alg = HMC(0.1, 10; adtype=adbackend)
353
m = DynamicPPL.contextualize(
0 commit comments