Skip to content

Commit 13f3346

Browse files
authored
[https://nvbugs/6398200][fix] Remove fixture-level params on mpi_pool_executor to avoid duplicate parametrization (NVIDIA#15860)
Signed-off-by: xxi <xxi@nvidia.com>
1 parent e4aba85 commit 13f3346

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

tests/unittest/conftest.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,10 +337,13 @@ def torch_empty_cache() -> None:
337337
torch.cuda.empty_cache()
338338

339339

340-
@pytest.fixture(scope="module", params=[2, 4, 8])
340+
@pytest.fixture(scope="module")
341341
def mpi_pool_executor(request):
342342
"""
343343
Start an MPIPoolExecutor with `request.param` workers.
344+
345+
Consumers must set the worker count via indirect parametrization, e.g.
346+
``@pytest.mark.parametrize("mpi_pool_executor", [2], indirect=True)``.
344347
"""
345348
num_workers = request.param
346349
with MPIPoolExecutor(num_workers) as executor:

0 commit comments

Comments
 (0)