RunnerBackend.JoblibRunnerBackend

Parallelisation backend based on the pyrallex Python library.

Usage

Source

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

Source

__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

Source

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.