Skip to content

Commit 5529367

Browse files
authored
changes from_kwargs to from_config (#954)
1 parent a1ff676 commit 5529367

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

cluster_tools/cluster_tools/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def get_executor(environment: str, **kwargs: Any) -> "Executor":
114114
if "client" in kwargs:
115115
return DaskExecutor(kwargs["client"])
116116
else:
117-
return DaskExecutor.from_kwargs(**kwargs)
117+
return DaskExecutor.from_config(**kwargs)
118118
elif environment == "multiprocessing":
119119
global did_start_test_multiprocessing
120120
if not did_start_test_multiprocessing:

cluster_tools/cluster_tools/executors/dask.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
TYPE_CHECKING,
77
Any,
88
Callable,
9+
Dict,
910
Iterable,
1011
Iterator,
1112
List,
@@ -37,13 +38,13 @@ def __init__(
3738
self.client = client
3839

3940
@classmethod
40-
def from_kwargs(
41+
def from_config(
4142
cls,
42-
**kwargs: Any,
43+
job_resources: Dict[str, Any],
4344
) -> "DaskExecutor":
4445
from distributed import Client
4546

46-
return cls(Client(**kwargs))
47+
return cls(Client(**job_resources))
4748

4849
@classmethod
4950
def as_completed(cls, futures: List["Future[_T]"]) -> Iterator["Future[_T]"]:

0 commit comments

Comments
 (0)