RunnerBackend.JoblibRunnerBackend
Parallelisation backend based on the pyrallex Python library.
Usage
RunnerBackend.JoblibRunnerBackend(ncores=os.cpu_count() - 1)Attributes
ncores: int- Number of cores to use for parallelisation.
Methods
| Name | Description |
|---|---|
| __init__() | Initialise the pyrallex backend. |
| pyrallex() | Run experiments in parallel. |
__init__()
Initialise the pyrallex backend.
Usage
__init__(ncores=os.cpu_count() - 1)Parameters
ncores: int = os.cpu_count() - 1- ncores (int): Number of cores to use for parallelisation. Defaults to one less than the available number of cores on your machine.
pyrallex()
Run experiments in parallel.
Usage
pyrallex(runner, jobids)Parameters
runner: Callable[[int], any]-
A function that expects a job ID and returns anything. As a side effect the function shall write to the job’s output path.
jobids: list[int]- List of job IDs to be executed.
Returns
list[any]- A list of whatever the ‘runner’ function returns.