Skip to content

Commit

Permalink
multiprocessing only with num_cores (#1117)
Browse files Browse the repository at this point in the history
* multiprocessing only with num_cores

* revert to what @Baschdl suggested

* update comment

* remove comment
  • Loading branch information
manuelgloeckler authored Apr 2, 2024
1 parent 52aa512 commit c8b87c3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/multiprocessing_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def slow_linear_gaussian(theta):


@pytest.mark.slow
@pytest.mark.parametrize("num_workers", [10, -2])
@pytest.mark.parametrize("num_workers", [2])
@pytest.mark.parametrize("sim_batch_size", ((1, 10, 100)))
def test_benchmarking_parallel_simulation(sim_batch_size, num_workers):
"""Test whether joblib is faster than serial processing."""
Expand Down Expand Up @@ -54,5 +54,5 @@ def test_benchmarking_parallel_simulation(sim_batch_size, num_workers):
)
toc_joblib = time.time() - tic

# Allow joblib to be 10 percent slower due to overhead.
assert toc_joblib <= toc_sp * 1.1
# Allow joblib to be 50 percent slower due to overhead.
assert toc_joblib <= toc_sp * 1.5

0 comments on commit c8b87c3

Please sign in to comment.