v0.3: outcome task — AUC scoring + prior baseline#7
Closed
protosphinx wants to merge 1 commit into
Closed
Conversation
- score_outcome — pure-CPython rank-sum AUC with average-rank tie breaking; single-class degenerate case returns 0.5 (rather than NaN) so leaderboard rows stay readable - prefixes.py: OutcomeTarget + extract_outcome_targets — repeats the case's final 0/1 outcome at every prefix length so models see the same target with progressively more context - baselines/prior_outcome.py: last-activity-conditioned positive rate (with global-rate fallback for unseen activities). The dumbest baseline that uses *any* prefix signal — tying it means the model isn't using the trace at all - _synth.is_positive_outcome — synthetic-toy outcome rule (case ends with delivery_confirmed) - CLI: --task outcome, --baseline prior wired through prefixes / predict / score; outcome rule dispatch by dataset name - 8 new tests (test_outcome.py) — extraction, baseline determinism, per-last-activity rates, CSV round-trips, e2e click pipeline; 73 total - No leaderboard entry on synthetic-toy yet: seed=42's test partition happens to have n_pos=0, so AUC degenerates. The pipeline still runs cleanly; a real leaderboard row waits on a pinned BPI dataset
This was referenced May 1, 2026
Member
Author
|
Merged into main as part of the audit-cleanup stack (commit 9c00b47). The full content of this PR is now on main. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on top of #6 (remaining-time). Merge order: #2 → #3 → #4 → #5 → #6 → this.
Summary
What's new
score_outcome— rank-sum AUC with average-rank tie breaking. Degenerate single-class case returns 0.5 by convention rather than NaN, so leaderboard rows stay readable.OutcomeTarget+extract_outcome_targets— repeats the case's final 0/1 outcome at every prefix length. Models see the same target with progressively more context — a clean way to measure "how soon can you tell?"prior_outcomebaseline — last-activity → empirical positive rate, with global-rate fallback. ~30 lines of CPython._synth.is_positive_outcome— synthetic-toy rule: case ends withdelivery_confirmed.--task outcome,--baseline prior. UsageError on mismatched (task, baseline) pairs. Outcome rule resolved by dataset name.test_outcome.py) — extraction, baseline determinism, per-last-activity rates, CSV round-trips, e2e click-runner pipeline. 73 total.Smoke (synthetic-toy)
The
n_pos: 0is honest about what the data supports; the rest of the pipeline is verified bytests/test_outcome.pyagainst a hand-built event set with controlled class balance.Test plan
pytest -q— 73 passed (was 59 on PR v0.2: remaining-time task + mean reference baseline #6)ruff check pm_bench tests— cleanRoadmap impact