Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase atol on specific tests for x86 #2449

Merged
merged 1 commit into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion test/mcmc/ess.jl
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ using Turing
@varname(mu2) => ESS(),
)
chain = sample(StableRNG(seed), MoGtest_default, alg, 2000)
check_MoGtest_default(chain; atol=0.1)
# (penelopeysm) Note that the tolerance for x86 needs to be larger
# because CSMC (i.e. PG) is not reproducible across architectures.
# See https://github.com/TuringLang/Turing.jl/issues/2446.
atol = Sys.ARCH == :i686 ? 0.12 : 0.1
check_MoGtest_default(chain; atol=atol)
end

@testset "TestModels" begin
Expand Down
8 changes: 7 additions & 1 deletion test/mcmc/gibbs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,13 @@ end
# the posterior is analytically known? Doing 10_000 samples to run the test suite
# is not ideal
# Issue ref: https://github.com/TuringLang/Turing.jl/issues/2402
@test isapprox(mean(num_ms), 8.6087; atol=0.8)

# (penelopeysm) Note also the larger atol on x86 runners. This is
# needed because PG is not fully reproducible across architectures,
# even when seeded as above. See
# https://github.com/TuringLang/Turing.jl/issues/2446
mean_atol = Sys.ARCH == :i686 ? 1.3 : 0.8
@test isapprox(mean(num_ms), 8.6087; atol=mean_atol)
@test isapprox(std(num_ms), 1.8865; atol=0.02)
end

Expand Down
Loading