pypesto.engine
Engines
The execution of the multistarts can be parallelized in different ways, e.g. multi-threaded or cluster-based. Note that it is not checked whether a single task itself is internally parallelized.
- class pypesto.engine.MultiProcessEngine(n_procs=None, method=None)[source]
Bases:
Engine
Parallelize the task execution using multiprocessing.
- Parameters:
n_procs (
Optional
[int
]) – The maximum number of processes to use in parallel. Defaults to the number of CPUs available on the system according to os.cpu_count(). The effectively used number of processes will be the minimum of n_procs and the number of tasks submitted.method (
Optional
[str
]) – Start method, any of “fork”, “spawn”, “forkserver”, or None, giving the system specific default context.
- class pypesto.engine.MultiThreadEngine(n_threads=None)[source]
Bases:
Engine
Parallelize the task execution using multithreading.
- class pypesto.engine.SingleCoreEngine[source]
Bases:
Engine
Dummy engine for sequential execution on one core.
Note that the objective itself may be multithreaded.