Skip to content

Sensitivity workload: dated rule refinement, arm list derived from results - #70

Merged
SamMausberg merged 2 commits into
mainfrom
bench/sensitivity
Oct 1, 2026
Merged

SamMausberg merged 2 commits into
mainfrom
bench/sensitivity

Conversation

@SamMausberg

@SamMausberg SamMausberg commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

Two changes requested before the first natural-length sensitivity run. No sensitivity run exists yet.

  1. Rule refinement, dated. The declaration in bench/README.md (b028c6c, 03:40 UTC) now notes the refinement made in 6b25b9f at 03:47 UTC, still before any sensitivity run:

    • the arm with the highest mean y over the three confirmation sessions;
    • invalid points excluded;
    • both arms run when the family's second is within 2% of the best.
  2. Arm list from the results, not by hand. bench.sensitivity_arms reads the confirmation points.csv. It averages y over sessions confirm-r0, -r1 and -r2 only, and requires a valid point in each of the three. An arm run only in the supplementary hold (mtp-stockverify), or with an invalid point in any session, is therefore listed as ineligible rather than competing on fewer runs.

    For each family (MTP, DFlash) at c=32 and 128 it picks the arm or arms and adds the matched plain baseline at the same concurrency: plain-tuned for FlashInfer, plain-tuned-triton for Triton. It writes two files, both committed with the sensitivity evidence:

    • plan.txt, one arm c [c ...] line per arm;
    • selection.json, with the sessions, the per-family rankings, the choices and the ineligible arms.

    campaigns/sensitivity.sh <session> [plan] refuses a plan.txt or selection.json that is untracked or differs from HEAD. Otherwise it runs the plan, reversed in odd sessions. The script fails if:

    • a family has no eligible arm at a level;
    • a selected arm's capacity is below its concurrency.

Checks: pytest tests/test_bench_harness.py (34 passed; the rule's test covers a tie, an arm with one invalid session, a supplementary-only arm and both backends), pre-commit clean.

python -m bench.sensitivity_arms evidence/bench/confirm/points.csv --out evidence/bench/sensitivity
scripts/gpu_lock.sh -x bench/campaigns/natural_lengths_confirm.sh
scripts/gpu_lock.sh -x bench/campaigns/sensitivity.sh 0   # then 1, 2

bench.sensitivity_arms applies the declared rule to the confirmation
frontier.csv (best mean y per family at c=32 and 128, invalid points
excluded, both arms within 2%, matched plain baselines) and writes
plan.txt and selection.json; sensitivity.sh runs that plan. The README
declaration records the rule's refinement in 6b25b9f (03:47 UTC), before
any sensitivity run.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 1, 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-10-01T03:52:02.625862Z 2a7cb38 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.

@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: REQUEST CHANGES

Reviewed head 2a7cb38, one commit on main. Both #66 follow-ups are present. The selection script does not yet restrict itself to the three confirmation sessions, and the run script checks that a plan exists but not that it is committed.

Checked and correct

  • Declaration note. The README records the refinement: commit 6b25b9f at 03:47 UTC, before any sensitivity run. It quotes the original wording from b028c6c ("highest confirmation y").
  • No early runs (integrator check 3). ~/vp-data/bench/sensitivity does not exist. The only natural-length data, ~/vp-data/bench/natural/natural-tune-mtp and lengths_tune.json (2026-09-30), is the tune-split length run, not a timed arm on this workload.
  • The rule mechanics.
    • select() ranks each family's arms per concurrency by y_mean and ignores rows with n = 0, so invalid points are excluded through the frontier's means.
    • It takes at most two arms, the best and one more if that one is within 2% (y >= 0.98 * best).
    • It adds the matched plain baseline by target attention backend and refuses a selection above an arm's capacity.
    • selection.json records the full ranking.
    • The test covers the 2% rule, all-invalid rows and the baseline mapping, and 34 tests pass. Pre-commit is clean.

Blocking

B1. The ranking is not restricted to the three confirmation sessions (bench/sensitivity_arms.py, select).

  • The declared rule is "the highest mean y over the three confirmation sessions". But frontier.csv aggregates every session in which a label ran, including the supplementary hold (confirm-supp), and it carries no session column.
  • So mtp-stockverify, which runs only in the supplementary hold, would compete in the MTP ranking at c = 32 and 128 on a single run. Your own test includes it as a candidate with n = 3.
  • Fix: compute the means from points.csv restricted to sessions confirm-r0, confirm-r1 and confirm-r2, with invalid points excluded. Require all three sessions, or at least state and enforce a minimum. Record the sessions used in selection.json.
  • Alternatively, if the fallback arm is meant to be eligible, say so in the declaration. As written, the rule excludes it.

B2. sensitivity.sh runs on any plan file, committed or not (integrator check 2).

  • It checks only [ -s "$PLAN" ]. The README says the plan "is committed with the sensitivity evidence ... before the first session".
  • Fix: before the first session, refuse unless the plan and selection.json are tracked and unmodified. For example: git ls-files --error-unmatch "$PLAN", then git diff --quiet HEAD -- "$PLAN" "$(dirname "$PLAN")/selection.json".

Address #70 review. bench.sensitivity_arms averages y from points.csv over
confirm-r0, -r1 and -r2 and requires a valid point in each, so an arm run
only in the supplementary hold, or with an invalid point in any session,
is listed as ineligible instead of competing on fewer runs; selection.json
records the sessions and the ineligible arms. sensitivity.sh refuses a
plan or selection record that is untracked or differs from HEAD.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2a7cb386d1

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread bench/sensitivity_arms.py Outdated
Comment on lines +57 to +58
if label in known and int(row['n']) > 0 and math.isfinite(y):
means[(label, c)] = y

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Exclude arms not attempted in all three sessions

When the confirmation evidence includes mtp-stockverify from bench/campaigns/confirm_supplementary.sh, that arm has only one attempted session, yet this predicate admits any row with one valid point. A sufficiently high single-run mean can therefore beat arms measured in all three confirm-r* sessions and determine the committed sensitivity workload, contrary to the declared three-session selection rule. Use n + n_invalid to require three attempted sessions while still excluding invalid points from the mean, or otherwise restrict candidates to the three-session campaign.

Useful? React with 👍 / 👎.

@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: APPROVE

Re-reviewed head 7f92add (one commit on 2a7cb38). Both blocking items are fixed. The declaration is unchanged, so the fallback arm is not eligible.

  • B1 (fixed). bench.sensitivity_arms now reads points.csv and averages y over confirm-r0, confirm-r1 and confirm-r2 only.
    • An arm qualifies at a concurrency only with a valid point in all three sessions. Anything else, including any arm from confirm-supp, is listed under ineligible with its missing sessions and the sessions where it was invalid.
    • Two valid points for one arm in one session are an error.
    • selection.json records the sessions.
    • The test covers mtp-stockverify in confirm-supp at an inflated y (never eligible) and dflash-tuned-b4 invalid in r1 (ineligible).
  • B2 (fixed). sensitivity.sh refuses to start unless plan.txt and selection.json pass git ls-files --error-unmatch and git diff --quiet HEAD.
  • Checks. 34 tests pass and pre-commit is clean. Codex's P1 on 2a7cb38 (arms not attempted in all three sessions) is the same issue as B1 and is fixed by this commit.

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.

1 participant