Skip to content

Commit

Permalink
Remove kwargs from LocalCUDACluster (#562)
Browse files Browse the repository at this point in the history
Based on some discussions in #561, this PR removes some kwargs from `LocalCUDACluster` that may not be needed:

- `processes` doesn't have any impact on its construction (other than throwing a `ValueError` if it's set false); this should be safe to remove altogether
- `data` is pretty complex and it isn't commonly specified, so it can be removed from the named arguments and accessed through the `kwargs` object if it is specified

Authors:
  - Charles Blackmon-Luca (https://github.com/charlesbluca)

Approvers:
  - Peter Andreas Entschev (https://github.com/pentschev)

URL: #562
  • Loading branch information
charlesbluca authored Apr 9, 2021
1 parent 424c3ee commit aa94021
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
5 changes: 2 additions & 3 deletions dask_cuda/local_cuda_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,9 @@ def __init__(
self,
n_workers=None,
threads_per_worker=1,
processes=True,
memory_limit="auto",
device_memory_limit=0.8,
CUDA_VISIBLE_DEVICES=None,
data=None,
local_directory=None,
protocol=None,
enable_tcp_over_ucx=False,
Expand Down Expand Up @@ -225,7 +223,7 @@ def __init__(

self.rmm_log_directory = rmm_log_directory

if not processes:
if not kwargs.pop("processes", True):
raise ValueError(
"Processes are necessary in order to use multiple GPUs with Dask"
)
Expand All @@ -235,6 +233,7 @@ def __init__(
else:
self.jit_unspill = jit_unspill

data = kwargs.pop("data", None)
if data is None:
if self.jit_unspill:
data = (
Expand Down
1 change: 0 additions & 1 deletion dask_cuda/tests/test_explicit_comms.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,6 @@ def _test_jit_unspill(protocol):
dashboard_address=None,
n_workers=1,
threads_per_worker=1,
processes=True,
jit_unspill=True,
device_memory_limit="1B",
) as cluster:
Expand Down
1 change: 0 additions & 1 deletion dask_cuda/tests/test_spill.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ async def test_cupy_cluster_device_spill(params):
async with LocalCUDACluster(
1,
scheduler_port=0,
processes=True,
silence_logs=False,
dashboard_address=None,
asynchronous=True,
Expand Down

0 comments on commit aa94021

Please sign in to comment.