spdl.pipeline.defs.PlacementConfig

class PlacementConfig(target: ProcessPoolExecutorConfig | InterpreterPoolExecutorConfig | _MainProcess, name: str = 'placement')[source]

[Experimental] A region marker designating where the subsequent stages execute.

Sits among the stage configs in PipelineConfig.pipes: every stage after this marker (until the next PlacementConfig) runs on target. spdl.pipeline.PipelineBuilder.to() appends one of these. A pipeline implicitly starts on the main process, so a marker is needed only to enter a worker-pool region and (with MAIN_PROCESS) to leave it.

Added in version 0.6.0.

Attributes

name

Name of the marker (used only for display).

target

Where the stages following this marker execute.

name: str = 'placement'

Name of the marker (used only for display).

target: ProcessPoolExecutorConfig | InterpreterPoolExecutorConfig | _MainProcess

Where the stages following this marker execute.