You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(xtest): show the faster-tail p-value beside an improvement - #643
The benchmark report's p (BH) column always showed the slower-tail p-value (p_adjusted / p_value). For a real speedup that tail is ~1, so an IMPROVED row read e.g. ratio 0.50 … p 1.000 … IMPROVED — the p-value contradicted the verdict on the same row. The verdict itself was correct (it already used p_adjusted_faster); only the rendering was wrong.
Fix
_p_cell now shows the one-sided tail in the direction of the observed ratio: the faster tail when ratio < 1, the slower tail otherwise, each preferring the BH-adjusted value and falling back to unadjusted (controls stay outside the BH families). The table footer notes that p is one-sided.
Ported from the closed#621 branch. Stage-1 follow-up to #625 (DSPX-4372).
Tests
New offline xtest/test_bench_report.py (added to the check.yml harness list): improvement → faster tail, slowdown/no-change → slower tail, unadjusted fallback, <0.001 floor, NaN → -.
Note: the check.yml list edit touches the same lines as #640 (which adds test_bench_config.py); whichever lands second needs a trivial rebase.
Summary by CodeRabbit
Bug Fixes
Performance reports now show the p-value for the observed direction of change: faster for improvements and slower for regressions or no change. The footer clarifies that p-values are one-sided.
Tests
Added offline coverage for report p-values, including adjusted and unadjusted values, very small values, and empty comparisons.
Expanded the offline test run to include benchmark measurement, runner, and report tests.
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: 0801e246-cba1-4444-929f-c684e1c40765
📥 Commits
Reviewing files that changed from the base of the PR and between 9c8fd0e and fc70592.
📒 Files selected for processing: 3
.github/workflows/check.yml
xtest/perf/report.py
xtest/test_bench_report.py
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
📝 Walkthrough
The report now selects a one-sided p-value based on the observed ratio. New offline tests cover p-value selection and formatting, and the workflow runs those tests.
Changes: P-value reporting
Layer / File(s)
Summary
P-value display and validation xtest/perf/report.py, xtest/test_bench_report.py, .github/workflows/check.yml
The report selects the faster-tail p-value when the ratio is below 1 and the slower-tail value otherwise. Tests cover tail selection, fallback values, tiny values, and empty comparisons. The offline workflow includes the report tests.
The supplied evidence identifies no issue that should block merging; complete the normal checks.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 11.11% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 9 functions across 2 files. (1 skipped: 1…
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks: 4 passed
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title clearly and concisely describes the main change: displaying the faster-tail p-value for benchmark improvements.
Linked Issues check
The only directly linked issue is #621. Issue #621 is closed and supplies historical context only. No active directly linked issue provides coding requirements for this pull request.
Out of Scope Changes check
The changes stay within the stated benchmark-report scope. xtest/perf/report.py selects the one-sided tail and adds the footer note. xtest/test_bench_report.py tests the rendering cases. `.github/…
Full details: Docstring Coverage
Explanation
Docstring coverage is 11.11% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 9 functions across 2 files. (1 skipped: 1 unsupported.)
Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
Commit to this branch
Create a new PR
🧪 Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
A rabbit checks the p-value line One tail for ratios under one Another when they rise above Tests hop through each fallback case The workflow runs them in the sun
Comment @coderabbitai help to get the list of available commands.
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
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.
Problem
The benchmark report's
p (BH)column always showed the slower-tail p-value (p_adjusted/p_value). For a real speedup that tail is ~1, so anIMPROVEDrow read e.g.ratio 0.50 … p 1.000 … IMPROVED— the p-value contradicted the verdict on the same row. The verdict itself was correct (it already usedp_adjusted_faster); only the rendering was wrong.Fix
_p_cellnow shows the one-sided tail in the direction of the observed ratio: the faster tail whenratio < 1, the slower tail otherwise, each preferring the BH-adjusted value and falling back to unadjusted (controls stay outside the BH families). The table footer notes that p is one-sided.Ported from the closed #621 branch. Stage-1 follow-up to #625 (DSPX-4372).
Tests
New offline
xtest/test_bench_report.py(added to thecheck.ymlharness list): improvement → faster tail, slowdown/no-change → slower tail, unadjusted fallback,<0.001floor, NaN →-.Note: the
check.ymllist edit touches the same lines as #640 (which addstest_bench_config.py); whichever lands second needs a trivial rebase.Summary by CodeRabbit