Skip to content

Commit

Permalink
Use Distributed helper for client fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverholworthy committed Jun 5, 2023
1 parent bab6828 commit 0c3d403
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ def assert_eq(a, b, *args, **kwargs):

import pytest
from asvdb import ASVDb, BenchmarkInfo, utils
from dask.distributed import Client, LocalCluster
from numba import cuda

import nvtabular
from merlin.core.utils import Distributed
from merlin.dag.node import iter_nodes

REPO_ROOT = Path(__file__).parent.parent
Expand Down Expand Up @@ -97,8 +97,9 @@ def assert_eq(a, b, *args, **kwargs):

@pytest.fixture(scope="module")
def client():
cluster = LocalCluster(n_workers=2)
client = Client(cluster)
distributed = Distributed(n_workers=2)
cluster = distributed.cluster
client = distributed.client
yield client
client.close()
cluster.close()
Expand Down

0 comments on commit 0c3d403

Please sign in to comment.