pyphi.parallel.scheduler#

Scheduler Protocol and policy types for the parallelization layer.

The Protocol abstracts process / thread / dask backends behind a single map_reduce entry point. Policies bundle the parameters that the public pyphi.parallel.map_reduce function passes as flat kwargs so backends share a stable surface.

Functions

default_scheduler([backend])

Return the scheduler for backend (or config.parallel_backend).

Classes

ChunkingPolicy([chunksize, ...])

Controls how items are batched for a worker.

ProgressPolicy([enabled, desc, total])

Scheduler(*args, **kwargs)

Backend-agnostic map-reduce dispatcher.

ShortcircuitPolicy(func, callback, args)