diff --git a/Project.toml b/Project.toml index 459f11dcbd..0f0cc356a8 100644 --- a/Project.toml +++ b/Project.toml @@ -51,7 +51,7 @@ TuringOptimExt = "Optim" ADTypes = "1.9" AbstractMCMC = "5.5" Accessors = "0.1" -AdvancedHMC = "0.3.0, 0.4.0, 0.5.2, 0.6" +AdvancedHMC = "0.3.0, 0.4.0, 0.5.2, 0.6, 0.7" AdvancedMH = "0.8" AdvancedPS = "0.6.0" AdvancedVI = "0.2" diff --git a/test/mcmc/Inference.jl b/test/mcmc/Inference.jl index da29e77089..a41fe5b226 100644 --- a/test/mcmc/Inference.jl +++ b/test/mcmc/Inference.jl @@ -115,7 +115,7 @@ using Turing ) check_gdemo(chn3) - chn3_contd = sample(StableRNG(seed), gdemo_default, alg3, 2_000; resume_from=chn3) + chn3_contd = sample(StableRNG(seed), gdemo_default, alg3, 5_000; resume_from=chn3) check_gdemo(chn3_contd) end diff --git a/test/mcmc/gibbs.jl b/test/mcmc/gibbs.jl index 697073d0a5..9af000e2c8 100644 --- a/test/mcmc/gibbs.jl +++ b/test/mcmc/gibbs.jl @@ -573,7 +573,7 @@ end # is not ideal # Issue ref: https://github.com/TuringLang/Turing.jl/issues/2402 @test isapprox(mean(num_ms), 8.6087; atol=0.8) - @test isapprox(std(num_ms), 1.8865; atol=0.02) + @test isapprox(std(num_ms), 1.8865; atol=0.03) end # The below test used to sample incorrectly before @@ -655,7 +655,7 @@ end # Run the Gibbs sampler and NUTS on the same model, compare statistics of the # chains. @testset "comparison with 'gold-standard' samples" begin - num_iterations = 1_000 + num_iterations = 2_000 thinning = 10 num_chains = 4 diff --git a/test/mcmc/hmc.jl b/test/mcmc/hmc.jl index d45846f3d4..2a9ee871b7 100644 --- a/test/mcmc/hmc.jl +++ b/test/mcmc/hmc.jl @@ -172,7 +172,7 @@ using Turing @testset "nuts inference" begin alg = NUTS(1000, 0.8; adtype=adbackend) - res = sample(StableRNG(seed), gdemo_default, alg, 500) + res = sample(StableRNG(seed), gdemo_default, alg, 5_000) check_gdemo(res) end @@ -251,7 +251,7 @@ using Turing gdemo_default_prior = DynamicPPL.contextualize( demo_hmc_prior(), DynamicPPL.PriorContext() ) - chain = sample(gdemo_default_prior, alg, 500; initial_params=[3.0, 0.0]) + chain = sample(gdemo_default_prior, alg, 5_000; initial_params=[3.0, 0.0]) check_numerical( chain, [:s, :m], [mean(truncated(Normal(3, 1); lower=0)), 0]; atol=0.2 )