Skip to content

v0.3.0

Latest

Choose a tag to compare

@mthrok mthrok released this 23 Mar 15:42
· 10 commits to main since this release
138fcea

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 Iterator instead of Optional[Frames] (#1280): Decoder.streaming_decode_packets() and Decoder.flush() now return iterator objects.
    Code that checked return values for None must migrate to iteration (for frames in decoder.streaming_decode_packets(packets)). ImageDecoder has been removed as a public class.
  • TaskHook.task_hook() signature changed (#1287): The task_hook() method now accepts an input_item parameter, allowing hooks to inspect which input item caused a failure. All existing TaskHook subclasses must update their signature from async def task_hook(self) to async def task_hook(self, input_item=None).
  • AggregateConfig now requires op parameter (#1291): AggregateConfig no longer accepts num_items directly. Migrate from AggregateConfig(..., num_items=N, ...) to AggregateConfig(..., op=Collate(N), ...), or use the convenience function Aggregate(N).

New Features

  • Add polymorphic Aggregate API with Aggregator base class and Collate built-in implementation (#1289)
  • Add set_buffer_size() for VideoDecoder to 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_failures threshold check — max_failures=N now correctly allows N failures before stopping (#1297)
  • Fix symbol resolution for removed ImageDecoder in __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_version and free_threaded fields in benchmark utilities (#1286)

Documentation

  • Fix docstrings (#1273, #1277)
  • Update installation docs — mention Windows support and component packages (#1281)