Skip to content

Commit

Permalink
Fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
pentschev committed Jul 23, 2024
1 parent 51a5201 commit ecd0a83
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion dask_cuda/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions dask_cuda/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
15 changes: 5 additions & 10 deletions dask_cuda/tests/test_dask_cuda_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down
12 changes: 8 additions & 4 deletions dask_cuda/tests/test_local_cuda_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit ecd0a83

Please sign in to comment.