MCPcopy Create free account
hub / github.com/It4innovations/hyperqueue / DaskWorkerConfig

Class DaskWorkerConfig

benchmarks/src/environment/dask.py:27–40  ·  view source on GitHub ↗

One Dask worker corresponds to one node.

Source from the content-addressed store, hash-verified

25
26@dataclasses.dataclass(frozen=True)
27class DaskWorkerConfig:
28 """
29 One Dask worker corresponds to one node.
30 """
31
32 processes: int
33 threads_per_process: int
34 node: Optional[int] = None
35 init_cmd: List[str] = dataclasses.field(default_factory=list)
36
37 @staticmethod
38 def create(count: int, n_processes: int = 1, **kwargs) -> "DaskWorkerConfig":
39 assert count % n_processes == 0
40 return DaskWorkerConfig(processes=n_processes, threads_per_process=count // n_processes, **kwargs)
41
42
43@dataclasses.dataclass(frozen=True)

Callers 3

sleepFunction · 0.90
single_node_dask_clusterFunction · 0.85
createMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected