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

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

Closed
penelopeysm opened this issue Oct 22, 2024 · 1 comment · Fixed by #2381
Closed

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

penelopeysm opened this issue Oct 22, 2024 · 1 comment · Fixed by #2381
Assignees

Comments

@penelopeysm
Copy link
Member

@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).

@penelopeysm
Copy link
Member Author

Apparently AdvancedHMC external-sampler tests also randomly fail, so maybe it's an external sampler problem.

Example: https://github.com/TuringLang/Turing.jl/actions/runs/11484388154/job/31971970590?pr=2354

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants