voiage.parallel.distributed.distributed_map
distributed_map
Section titled “distributed_map”distributed_map([positional or keyword] items: Sequence[Item] | Iterable[Item] = None, [positional or keyword] worker_func: Callable[[Item], ChunkResult] = None, [keyword-only] config: ClusterExecutionConfig | None = None, [keyword-only] n_workers: int | None = None, [keyword-only] use_processes: bool | None = None, [keyword-only] executor_factory: Callable[[int, bool], Executor] | None = None) -> list[ChunkResult]Execute work across a CPU pool or a caller-supplied distributed executor.
The call preserves input ordering, so the returned list is aligned to the incoming item sequence even when the underlying executor completes tasks out of order.
Parameters:
itemsSequence[Item] | Iterable[Item]worker_funcCallable[[Item], ChunkResult]configClusterExecutionConfig | None(default:None)n_workersint | None(default:None)use_processesbool | None(default:None)executor_factoryCallable[[int, bool], Executor] | None(default:None)
Returns: list[ChunkResult]