ParallelLocalRunner#

class ParallelLocalRunner(n_jobs: int = 1, backend: str = 'multiprocessing', mmap_mode: str = 'c', joblib_params: dict | None = None)[source]#

Bases: AbstractRunner

ParallelLocalRunner for multiple parallel runs with joblib.

Notes

Global objects behavior could be different while parallel usage because platform dependent new process start. Be sure that new process is started with fork via multiprocessing.set_start_method. If it’s not possible you should try define all globals before if __name__ == "__main__" scope.

Init ParallelLocalRunner.

Parameters:
  • n_jobs (int) – number of parallel jobs to use

  • backend (str) – joblib backend to use

  • mmap_mode (str) – joblib mmap mode

  • joblib_params (dict | None) – joblib additional params

Methods

__call__(func, *args, **kwargs)

Call given func with Joblib and *args and **kwargs.

__call__(func: Callable[[...], T], *args, **kwargs) List[T][source]#

Call given func with Joblib and *args and **kwargs.

Parameters:

func (Callable[[...], T]) –

Return type:

List[T]