SPDL v0.3.0 Release Notes
Highlights
Polymorphic Aggregate API — The pipeline's aggregation stage now supports custom aggregation logic via the new Aggregator abstract base class. Subclass Aggregator and implement accumulate() / flush() methods for custom batching strategies (e.g., size-based batching, time-windowed aggregation, conditional grouping).
The built-in Collate class provides the previous fixed-size batching behavior. (#1289, #1291)
Streaming decoding now returns Iterators — Streaming decode methods (streaming_decode_packets and flush methods of AudioDecoder and VideoDecoder) now return proper Python iterators instead
of Optional[Frames]. This makes the interface more Pythonic and naturally handles cases where feeding packets or flushing produces multiple batches of frames. (#1280)
Fraction-based failure rate thresholds — Pipeline stages now support Fraction-based failure thresholds (e.g., Fraction(1, 10) for 10% max failure rate) in addition to absolute integer counts. (#1296)
BC-Breaking Changes
- Streaming decoding returns
Iteratorinstead ofOptional[Frames](#1280):Decoder.streaming_decode_packets()andDecoder.flush()now return iterator objects.
Code that checked return values forNonemust migrate to iteration (for frames in decoder.streaming_decode_packets(packets)).ImageDecoderhas been removed as a public class. TaskHook.task_hook()signature changed (#1287): Thetask_hook()method now accepts aninput_itemparameter, allowing hooks to inspect which input item caused a failure. All existingTaskHooksubclasses must update their signature fromasync def task_hook(self)toasync def task_hook(self, input_item=None).AggregateConfignow requires op parameter (#1291):AggregateConfigno longer acceptsnum_itemsdirectly. Migrate fromAggregateConfig(..., num_items=N, ...)toAggregateConfig(..., op=Collate(N), ...), or use the convenience functionAggregate(N).
New Features
- Add polymorphic Aggregate API with Aggregator base class and Collate built-in implementation (#1289)
- Add
set_buffer_size()forVideoDecoderto control the number of frames yielded per iteration during streaming decode (#1284) - Add GNU/PAX long filename extension support to
iter_tar, enabling correct handling of archives with filenames exceeding the 100-byte TAR limit
(#1283) - Add Fraction-based failure rate threshold support for pipeline stages (#1296)
- Add p90 and p99 percentile tracking to pipeline performance stats (#1306)
Bug Fixes
- Fix off-by-one error in
max_failuresthreshold check —max_failures=Nnow correctly allows N failures before stopping (#1297) - Fix symbol resolution for removed
ImageDecoderin__init__.py(#1292) - Fix implicit string concatenation issues (#1275)
Other Changes
- Extract duplicated failure error raising logic into
_FailCounter.raise_for_failures()(#1303) - Remove unused Python imports (#1282)
- Add defaults for
python_versionandfree_threadedfields in benchmark utilities (#1286)