Skip to content

Commit

Permalink
Increase tolerance marginally on some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
penelopeysm committed Dec 13, 2024
1 parent 24a3ec7 commit 544f9be
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/mcmc/Inference.jl
Original file line number Diff line number Diff line change
Expand Up @@ -157,15 +157,15 @@ using Turing
chains = sample(StableRNG(seed), gdemo_d(), Prior(), N)
@test chains isa MCMCChains.Chains
@test size(chains) == (N, 3, 1)
@test mean(chains, :s) 3 atol = 0.1
@test mean(chains, :s) 3 atol = 0.11
@test mean(chains, :m) 0 atol = 0.1
end

@testset "Multi-threaded" begin
chains = sample(StableRNG(seed), gdemo_d(), Prior(), MCMCThreads(), N, 4)
@test chains isa MCMCChains.Chains
@test size(chains) == (N, 3, 4)
@test mean(chains, :s) 3 atol = 0.1
@test mean(chains, :s) 3 atol = 0.11
@test mean(chains, :m) 0 atol = 0.1
end

Expand All @@ -177,7 +177,7 @@ using Turing
@test length(chains) == N
@test all(length(x) == 3 for x in chains)
@test all(haskey(x, :lp) for x in chains)
@test mean(x[:s][1] for x in chains) 3 atol = 0.1
@test mean(x[:s][1] for x in chains) 3 atol = 0.11
@test mean(x[:m][1] for x in chains) 0 atol = 0.1
end

Expand Down

0 comments on commit 544f9be

Please sign in to comment.