-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
maintenanceInternal maintenanceInternal maintenance
Description
A recent PR #1417 added the following lines
auto-sklearn/test/fixtures/dask.py
Lines 10 to 24 in 415f144
active_clients: dict[str, Callable] = {} | |
@fixture(autouse=True) | |
def clean_up_any_dask_clients(request: FixtureRequest) -> None: | |
"""Auto injected fixture to close dask clients after each test""" | |
yield | |
if any(active_clients): | |
for adr in list(active_clients.keys()): | |
if request.config.getoption("verbose") > 1: | |
print(f"\nFixture closing dask_client at {adr}") | |
close = active_clients[adr] | |
close() | |
del active_clients[adr] |
It's not sure how this interacts with parallelized pytest xdist
as in theory, the fixture above, which is automatically run at the end of any test, will check to see if their are any clients and then close it. I imagine this will not parallelize.
Metadata
Metadata
Assignees
Labels
maintenanceInternal maintenanceInternal maintenance