spdl.pipeline.defs.AggregateConfig¶
- class AggregateConfig(name: str, op: Aggregator, drop_last: bool = False, _type: _PipeType = _PipeType.Aggregate)[source]¶
Configuration for aggregation operation.
Changed in version 0.2.1: The config has been generalized to support custom aggregation method. You can provide a custom implementation by subclassing
Aggregatorclass and passing it viaop.With this change,
num_itemshas been moved toCollate.Before
AggregateConfig(..., num_items=N, ...)After
AggregateConfig(..., op=Collate(N), ...)
Note
You can use
Aggregate()to instantiate this config.Attributes
Whether to drop the last aggregation.
Name of the aggregation stage.
Aggregation operation.
- op: Aggregator¶
Aggregation operation. It must be a subclass of
Aggregator