Skip to content

Latest commit

 

History

History
37 lines (25 loc) · 1 KB

File metadata and controls

37 lines (25 loc) · 1 KB

batch controller

Language: Python · Sphere: programming · Category: Performance

Signature: (batch_size: int, baseline_time_per_item: float) → Metrics

What it does

Adaptive Batch Size Controller

A module for dynamically adjusting batch sizes based on throughput metrics to optimize processing performance.

Guarantee

When it runs, batch controller guarantees _mk(25.0).throughput == 25.0; got == expected; got == 17 (proven by run).

Checkable constraints:

  • _mk(25.0).throughput == 25.0
  • Metrics(1, 0.0, 10, 0.0).throughput == 0.0
  • got == expected
  • c.in_slow_start is still_slow
  • got == 17
  • c.in_slow_start is False
  • got == expected
  • c.current_batch_size == 1

Verification evidence

  • Green-run: ✓ passes (re-run under the extractor's gate)
  • Constraint strength: recovery (truth-pinned)
  • Independent oracle:consensus — xlang (validator v1.9)
  • Peer review: unreviewed

△ AURA Pattern Library — © Reality Optimizer