taps.executor.dask¶
DaskDistributedExecutor ¶
Bases: Executor
Dask task execution engine.
Parameters:
-
client(Client) –Dask distributed client.
Source code in taps/executor/dask.py
submit() ¶
Schedule the callable to be executed.
Parameters:
-
function(Callable[P, T]) –Callable to execute.
-
args(args, default:()) –Positional arguments.
-
kwargs(kwargs, default:{}) –Keyword arguments.
Returns:
Source code in taps/executor/dask.py
map() ¶
map(
function: Callable[P, T],
*iterables: Iterable[args],
timeout: float | None = None,
chunksize: int = 1
) -> Iterator[T]
Map a function onto iterables of arguments.
Parameters:
-
function(Callable[P, T]) –A callable that will take as many arguments as there are passed iterables.
-
iterables(Iterable[args], default:()) –Variable number of iterables.
-
timeout(float | None, default:None) –The maximum number of seconds to wait. If None, then there is no limit on the wait time.
-
chunksize(int, default:1) –Sets the Dask batch size.
Returns:
-
Iterator[T]–An iterator equivalent to:
map(func, *iterables)but the calls may be evaluated out-of-order.
Source code in taps/executor/dask.py
shutdown() ¶
Shutdown the client.
Source code in taps/executor/dask.py
DaskDistributedConfig ¶
Bases: ExecutorConfig
DaskDistributedExecutor plugin configuration.
Attributes:
-
scheduler(Optional[str]) –Dask scheduler address.
-
use_threads(bool) –Use threads rather than processes for local clusters.
-
workers(Optional[int]) –Number of Dask workers for local clusters.
-
daemon_workers(bool) –Daemonize Dask workers.
get_executor() ¶
get_executor() -> DaskDistributedExecutor
Create an executor instance from the config.