Coverage for cafl4ds/filters/accept_all.py: 100%
8 statements
« prev ^ index » next coverage.py v7.15.0, created at 2026-07-17 14:39 +0000
« prev ^ index » next coverage.py v7.15.0, created at 2026-07-17 14:39 +0000
1"""The B-floor filter: accept every batch, no replay, raw stream order.
3This is the *only* knob in Phase 0. It is the honest lower bound of the streaming loop — the
4model sees the correlated stream exactly as it arrives, with no selection intervention — and
5the reference every later filter is measured against.
6"""
8from __future__ import annotations
10import torch
12from cafl4ds.data.streams import StreamBatch
13from cafl4ds.filters.base import Filter, FilterContext
16class AcceptAll(Filter):
17 """B-floor: accepts the entire incoming batch unchanged."""
19 def select(self, batch: StreamBatch, ctx: FilterContext) -> torch.Tensor:
20 """Return every image in ``batch`` (no selection).
22 Args:
23 batch: The incoming label-free stream batch.
24 ctx: Unused (B-floor consults neither the model nor any health state).
26 Returns:
27 The batch's images unchanged.
28 """
29 del ctx # B-floor is model-agnostic.
30 return batch.images