WRITE · TRACE · UNDERSTAND
Project: make a replay-safe, cohort-aware rollout monitor
Predictions have unique id,cohort,baseline,candidate probabilities; outcomes have unique id,binary integer y,finite available.
Read lesson: Project: make a replay-safe, cohort-aware rollout monitor →
Your experiment
Predictions have unique id,cohort,baseline,candidate probabilities; outcomes have unique id,binary integer y,finite available. Pair only outcomes available<=finite asof. For every predicted cohort compute count and mean(candidate squared error - baseline squared error). A window has enough evidence only if every cohort reaches positive integer min_pairs. It is bad if sufficient and any cohort delta>nonnegative finite tolerance. Track consecutive bad windows, resetting on all other windows; rollback after two and latch rollback forever. Otherwise return continue for sufficient good evidence, hold otherwise. Window is a nonnegative increasing integer; identical canonical payload replay returns copied state, conflicting or older windows raise ValueError. Never mutate input state.
Python runs in your browser. Your draft stays on this device.
What to look for
Review delayed-label coverage, cohort policy, sequential monitoring and replay state. A two-window rule is an operational policy, not a statistical significance test. Replay follows the main orchestration function; helper computations execute and are checked separately.
Watch your code work
Ready to experimentWrite a solution or load the worked answer, then choose Trace & check.
Step through arrays, variables and training curves produced by your own Python.
