Skip to content

Commit 38fa2d6

Browse files
github-actions[bot]CompatHelper Juliamhauru
authored
CompatHelper: bump compat for AdvancedHMC to 0.7, (keep existing compat) (#2503)
* CompatHelper: bump compat for AdvancedHMC to 0.7, (keep existing compat) * Relax two test tolerances a bit * Adjust some tolerances and sample counts in tests * Adjust more test sample counts --------- Co-authored-by: CompatHelper Julia <[email protected]> Co-authored-by: Markus Hauru <[email protected]>
1 parent 1397d69 commit 38fa2d6

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ TuringOptimExt = "Optim"
5151
ADTypes = "1.9"
5252
AbstractMCMC = "5.5"
5353
Accessors = "0.1"
54-
AdvancedHMC = "0.3.0, 0.4.0, 0.5.2, 0.6"
54+
AdvancedHMC = "0.3.0, 0.4.0, 0.5.2, 0.6, 0.7"
5555
AdvancedMH = "0.8"
5656
AdvancedPS = "0.6.0"
5757
AdvancedVI = "0.2"

test/mcmc/Inference.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ using Turing
115115
)
116116
check_gdemo(chn3)
117117

118-
chn3_contd = sample(StableRNG(seed), gdemo_default, alg3, 2_000; resume_from=chn3)
118+
chn3_contd = sample(StableRNG(seed), gdemo_default, alg3, 5_000; resume_from=chn3)
119119
check_gdemo(chn3_contd)
120120
end
121121

test/mcmc/gibbs.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ end
573573
# is not ideal
574574
# Issue ref: https://github.com/TuringLang/Turing.jl/issues/2402
575575
@test isapprox(mean(num_ms), 8.6087; atol=0.8)
576-
@test isapprox(std(num_ms), 1.8865; atol=0.02)
576+
@test isapprox(std(num_ms), 1.8865; atol=0.03)
577577
end
578578

579579
# The below test used to sample incorrectly before
@@ -655,7 +655,7 @@ end
655655
# Run the Gibbs sampler and NUTS on the same model, compare statistics of the
656656
# chains.
657657
@testset "comparison with 'gold-standard' samples" begin
658-
num_iterations = 1_000
658+
num_iterations = 2_000
659659
thinning = 10
660660
num_chains = 4
661661

test/mcmc/hmc.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ using Turing
172172

173173
@testset "nuts inference" begin
174174
alg = NUTS(1000, 0.8; adtype=adbackend)
175-
res = sample(StableRNG(seed), gdemo_default, alg, 500)
175+
res = sample(StableRNG(seed), gdemo_default, alg, 5_000)
176176
check_gdemo(res)
177177
end
178178

@@ -251,7 +251,7 @@ using Turing
251251
gdemo_default_prior = DynamicPPL.contextualize(
252252
demo_hmc_prior(), DynamicPPL.PriorContext()
253253
)
254-
chain = sample(gdemo_default_prior, alg, 500; initial_params=[3.0, 0.0])
254+
chain = sample(gdemo_default_prior, alg, 5_000; initial_params=[3.0, 0.0])
255255
check_numerical(
256256
chain, [:s, :m], [mean(truncated(Normal(3, 1); lower=0)), 0]; atol=0.2
257257
)

0 commit comments

Comments
 (0)