-
Notifications
You must be signed in to change notification settings - Fork 160
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
test_benchmarking_parallel_simulation fails on CI for one configuration #1111
Comments
I can reproduce this issue locally on a machine with 10 cores, so the number of cores in the CI environment is not the issue. Indeed @famura, running this test with |
This run took 43min. So running the slow tests in parallel saves 10min. But the above mentioned tests also fails when sequentially executed: https://github.com/sbi-dev/sbi/actions/runs/8420009653/job/23053830420#step:7:3555 |
Maybe a quicker solution: Do we really need this test? It seems I thought so back then, but maybe we only have to test the API here and not the fact that parallel simulation should be faster than sequential simulation? (this should be obvious, and of course there is a trade off, but we don't have to do this benchmarking in our tests). what do the others think, e.g., @michaeldeistler @manuelgloeckler? |
I talked with @michaeldeistler today and he was in favor of changing the test to make it work instead of completely kicking it out. He also mentioned that the test failed on his old machine. We currently run it with This change works on Github Actions: https://github.com/sbi-dev/sbi/actions/runs/8471258924/job/23210817060. We may have to introduce the additional pytest mark |
Tested here: https://github.com/sbi-dev/sbi/actions/runs/8471478141/job/23211524576 |
I got a really naive comment that I still want to make. What speaks against using exactly 2 (or 3) workers? I suppose any action runner has at least 2 cores and it would technically still be a parallel simulation. This way we get a more deterministic behavior I suppose. |
To be honest I just tried to replicate the current behavior as close as possible. Setting it to 2 should work equally well and I would be in favor of reproducible behavior across machines. |
The test
test_benchmarking_parallel_simulation
fails forsim_batch_size=1, num_workers=10
but works for all other configurations on CI:https://github.com/sbi-dev/sbi/actions/runs/8418222476/job/23048287384?pr=1063#step:8:4939
The most likely reasons for this failure are either the overhead of creating 10 workers (on a machine with only 2 cores) is not worth it if we only have 1 sample per batch or problems with running this test with
-n auto
. I think the first is more likely because all other variants work.This was noticed in PR #1063 when running the slow tests on CI.
The text was updated successfully, but these errors were encountered: