spdl.pipeline.defs

Overview

This module provides building block definitions for Pipeline.

See also

Example: Pipeline definitions

Illustrates how to build a complex pipeline.

You can build a pipeline by creating a PipelineConfig, then passing it to spdl.pipeline.build_pipeline() function.

The following step explains the steps to build a pipeline using the building blocks.

API Reference

Functions

Aggregate

Aggregate

Create a AggregateConfig object for aggregation.

Disaggregate

Disaggregate

Create a DisaggregateConfig object for disaggregation.

Merge

Merge

Create a MergeConfig.

PathVariants

PathVariants

Create a PathVariantsConfig for variant path routing.

Pipe

Pipe

Create a PipeConfig.

Classes

Aggregator

Aggregator

Abstract base class for custom aggregation operations.

AggregateConfig

AggregateConfig

Configuration for aggregation operation.

Collate

Collate

Aggregator that collects items into batches of a specified size.

DisaggregateConfig

DisaggregateConfig

Configuration for disaggregation operation.

ExecutorConfig

ExecutorConfig

[Experimental] Base spec for a worker-pool executor.

InterpreterPoolExecutorConfig

InterpreterPoolExecutorConfig

[Experimental] A worker-pool executor backed by subinterpreters.

MergeConfig

MergeConfig

Merge multiple pipelines into one output queue.

PathVariantsConfig

PathVariantsConfig

Configuration for variant path routing.

PipeConfig

PipeConfig

A pipe configuration.

PipelineConfig

PipelineConfig

A pipeline configuration.

PlacementConfig

PlacementConfig

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

ProcessPoolExecutorConfig

ProcessPoolExecutorConfig

[Experimental] A worker-pool executor backed by subprocesses.

SinkConfig

SinkConfig

A sink configuration.

SourceConfig

SourceConfig

A source configuration.

Others

MAIN_PROCESS

MAIN_PROCESS

Sentinel .to() target for the main process.