pydvl.parallel.backends.joblib
¶
JoblibParallelBackend
¶
JoblibParallelBackend(config: ParallelConfig | None = None)
Bases: ParallelBackend
Class used to wrap joblib to make it transparent to algorithms.
Source code in src/pydvl/parallel/backends/joblib.py
executor
classmethod
¶
executor(
max_workers: int | None = None,
*,
config: ParallelConfig | None = None,
cancel_futures: CancellationPolicy | bool = CancellationPolicy.NONE
) -> Executor
Returns a futures executor for the parallel backend.
Example
PARAMETER | DESCRIPTION |
---|---|
max_workers |
Maximum number of parallel workers.
TYPE:
|
config |
(DEPRECATED) Object configuring parallel computation, with cluster address, number of cpus, etc.
TYPE:
|
cancel_futures |
Policy to use when cancelling futures after exiting an Executor.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Executor
|
Instance of [_ReusablePoolExecutor][joblib.externals.loky.reusable_executor._ReusablePoolExecutor]. |