From ecd0a837cae74dc59354f66cc540c8f4678392f6 Mon Sep 17 00:00:00 2001 From: Peter Andreas Entschev Date: Tue, 23 Jul 2024 21:26:25 +0200 Subject: [PATCH] Fix linting --- dask_cuda/cli.py | 2 +- dask_cuda/plugins.py | 1 + dask_cuda/tests/test_dask_cuda_worker.py | 15 +++++---------- dask_cuda/tests/test_local_cuda_cluster.py | 12 ++++++++---- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/dask_cuda/cli.py b/dask_cuda/cli.py index f595bccf..6a3518e0 100644 --- a/dask_cuda/cli.py +++ b/dask_cuda/cli.py @@ -113,7 +113,7 @@ def cuda(): type=int, default=0, help="""Set the cuDF spilling statistics level. This option has no effect if - `--enable-cudf-spill` is not specified.""" + `--enable-cudf-spill` is not specified.""", ) @click.option( "--rmm-pool-size", diff --git a/dask_cuda/plugins.py b/dask_cuda/plugins.py index 31308e09..122f93ff 100644 --- a/dask_cuda/plugins.py +++ b/dask_cuda/plugins.py @@ -22,6 +22,7 @@ def __init__(self, spill, spill_stats): def setup(self, worker=None): try: import cudf + cudf.set_option("spill", self.spill) cudf.set_option("spill_stats", self.spill_stats) except ImportError: diff --git a/dask_cuda/tests/test_dask_cuda_worker.py b/dask_cuda/tests/test_dask_cuda_worker.py index aeab9c7f..505af12f 100644 --- a/dask_cuda/tests/test_dask_cuda_worker.py +++ b/dask_cuda/tests/test_dask_cuda_worker.py @@ -249,14 +249,13 @@ def test_cudf_spill_disabled(loop): # noqa: F811 assert wait_workers(client, n_gpus=get_n_gpus()) cudf_spill = client.run( - cudf.get_option, "spill", + cudf.get_option, + "spill", ) for v in cudf_spill.values(): assert v is False - cudf_spill_stats = client.run( - cudf.get_option, "spill_stats" - ) + cudf_spill_stats = client.run(cudf.get_option, "spill_stats") for v in cudf_spill_stats.values(): assert v == 0 @@ -281,15 +280,11 @@ def test_cudf_spill(loop): # noqa: F811 with Client("127.0.0.1:9369", loop=loop) as client: assert wait_workers(client, n_gpus=get_n_gpus()) - cudf_spill = client.run( - cudf.get_option, "spill" - ) + cudf_spill = client.run(cudf.get_option, "spill") for v in cudf_spill.values(): assert v is True - cudf_spill_stats = client.run( - cudf.get_option, "spill_stats" - ) + cudf_spill_stats = client.run(cudf.get_option, "spill_stats") for v in cudf_spill_stats.values(): assert v == 2 diff --git a/dask_cuda/tests/test_local_cuda_cluster.py b/dask_cuda/tests/test_local_cuda_cluster.py index b5e67d41..b144d111 100644 --- a/dask_cuda/tests/test_local_cuda_cluster.py +++ b/dask_cuda/tests/test_local_cuda_cluster.py @@ -509,13 +509,15 @@ async def test_cudf_spill_disabled(): ) as cluster: async with Client(cluster, asynchronous=True) as client: cudf_spill = await client.run( - cudf.get_option, "spill", + cudf.get_option, + "spill", ) for v in cudf_spill.values(): assert v is False cudf_spill_stats = await client.run( - cudf.get_option, "spill_stats", + cudf.get_option, + "spill_stats", ) for v in cudf_spill_stats.values(): assert v == 0 @@ -532,13 +534,15 @@ async def test_cudf_spill(): ) as cluster: async with Client(cluster, asynchronous=True) as client: cudf_spill = await client.run( - cudf.get_option, "spill", + cudf.get_option, + "spill", ) for v in cudf_spill.values(): assert v is True cudf_spill_stats = await client.run( - cudf.get_option, "spill_stats", + cudf.get_option, + "spill_stats", ) for v in cudf_spill_stats.values(): assert v == 2