Repository navigation
Use square-root performance scoring - #118
Merged
Merged
Conversation
irvineoy
marked this pull request as ready for review
October 13, 2026 03:34
Tests added on main after this branch was cut still asserted the additive 120/220/320 scale. Update them to the bounded square-root score. The review gate fixture now uses a synthetic 2x candidate, so its score assertion still distinguishes accepted from rejected candidates instead of reading 0 for both. Remove score cases that repeat an already covered branch: equal-class invalid speedups and constants, a default-curve point duplicated by the power test, method-consistency inputs covered by dedicated tests, and the all-zero report-format run. Format the per-measurement average score with four decimals, matching the other score fields.
src/utils/utils.py and src/utils/report_generation.py have no callers, imports, or documentation references. They inferred compilation and correctness from score thresholds of 20, 120, and 220, which the bounded score no longer encodes: failed checks and unimproved correct candidates now both score 0. Current reports derive those counts from the pass_compilation and pass_correctness fields instead.
irvineoy
force-pushed
the
codex/power-score
branch
from
October 20, 2026 00:49
edd6697 to
80dca1e
Compare
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.
Replace the additive compilation/correctness/speedup score with
max(0, 1 - 1.05 / speedup_ratio) ** 0.5. Correct, comparable candidates earn a positive score only above 1.05x speedup; failed checks and invalid comparisons score zero. The existingscorefield and mean-per-case speedup aggregation remain in use.Document
SCORE_POWERandSCORE_SPEEDUP_THRESHOLD, curve examples, and historical score comparability. Text reports and the dashboard display up to four decimal places. For an illustrative 1.25x speedup, the old score of 245 becomes 0.4; these are formula examples, not new GPU measurements.The branch is rebased onto current
mainand adds two follow-up commits:mainafter this branch was cut (tests/test_task_run_v2.py,tests/test_candidate_verification.py) still asserted the 120/220/320 scale; they now assert the bounded score. The review-gate fixture uses a synthetic 2x candidate, so its score assertion still distinguishes accepted from rejected candidates instead of reading 0 for both.src/utils/utils.pyandsrc/utils/report_generation.pyare removed. They had no callers, imports, or documentation references, and they inferred compilation and correctness from score thresholds (20/120/220) that the bounded score no longer encodes. Current reports count those frompass_compilationandpass_correctness.Validation (CPU only):
python:3.12-bookwormwith Python 3.12.15 and CPU PyTorch 2.14.1, using the CI dependency set and commands on this branch (80dca1e) and onmain(c0da09d) from the same checkout bundle:make check-perf-helpers: pass on both.python -m pytest -q tests --durations=25: this branch 14844 passed, 143 skipped, 0 failed;main14819 passed, 143 skipped, 0 failed.python -m compileall -q src tasks tests: pass on both.main(Linux-only process containment and GNU tool assumptions); three timing-sensitive process tests failed only while both suites ran concurrently and passed when rerun alone.