Skip to content

AdvancedMH external-sampler tests fail intermittently with 2 threads #2371

@penelopeysm

Description

@penelopeysm

@testset "AdvancedMH.jl" begin
@testset "RWMH" begin
@testset "$(model.f)" for model in DynamicPPL.TestUtils.DEMO_MODELS
# Need some functionality to initialize the sampler.
# TODO: Remove this once the constructors in the respective packages become "lazy".
sampler = initialize_mh_rw(model)
sampler_ext = DynamicPPL.Sampler(
externalsampler(sampler; unconstrained=true), model
)
@testset "initial_params" begin
test_initial_params(model, sampler_ext)
end
@testset "inference" begin
DynamicPPL.TestUtils.test_sampler(
[model],
sampler_ext,
10_000;
discard_initial=1_000,
thinning=10,
rtol=0.2,
sampler_name="AdvancedMH",
)
end
end
end

These tests seem to fail intermittently on the runner using ubuntu-latest; Julia 1.10; x64; 2 threads. I've observed it happen twice now.

Compare e.g. this failure with this success (the codebase was exactly the same, the only thing I did to get it to pass was to rerun CI).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions