Skip to content

Time only real updates in compare_prequential's p95 latency - #18

Merged
soodoku merged 1 commit into
mainfrom
claude/vibrant-heisenberg-osft1o
Sep 29, 2026
Merged

soodoku merged 1 commit into
mainfrom
claude/vibrant-heisenberg-osft1o

Conversation

@soodoku

@soodoku soodoku commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

In compare_prequential's batch path, batches with no observed labels (under observe_mask) were timed as zero-cost updates, dragging p95_update_ms toward zero, so select(max_update_ms=...) could accept configurations that miss the budget. Now only batches that actually call update are timed, matching the delayed-label path.

Proof it fixes the bug

  • New test test_update_latency_ignores_masked_batches (2 ms updater, 1 of 40 labels observed, both paths): the batch case fails on main and passes here.
  • Same random inputs, median p95_update_ms:
labels observed main this PR
100% 0.69 ms 0.79 ms (same, timing noise)
2% 0.016 ms 0.69 ms

Proof of no regressions

  • Differential test: 120 configuration runs (streaming isotonic and batch isotonic; batch sizes 1–7; masks of 100/50/2%) on identical inputs from main and this branch. 0 differences in any non-timing field (Brier, log loss, calibration error, AUC, per-batch and cumulative scores, squared errors, state and serialized sizes).
  • Full suite: 144 passed; ruff, ruff format, pyright, pydoclint clean; CI green.

🤖 Generated with Claude Code

https://claude.ai/code/session_011pXaJ5DLex7BrdUyfTqjL4

Masked-out batches were timed as zero-cost updates, so with a sparse
observe_mask p95_update_ms collapsed toward zero (0.006 ms vs 0.76 ms
with 2% of labels observed) and select(max_update_ms=...) could accept
configurations that miss the budget. The delayed-label path already
timed only real updates; the batch path now matches it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011pXaJ5DLex7BrdUyfTqjL4
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-29T01:08:30.048756Z aaa00f4 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@soodoku
soodoku merged commit 4ffb98a into main Sep 29, 2026
11 checks passed
@soodoku
soodoku deleted the claude/vibrant-heisenberg-osft1o branch September 29, 2026 01:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants