Repository navigation
Drafter: ring tile sweep pre-registration (declared threshold rule, rotated tile order, failed runs to sweep.failed.json; #167 README rounding) - #185
Conversation
… declared_threshold in sweep.json), tile order rotated across four repeats with the stock reference alternating ends, a failed bitwise gate writes sweep.failed.json; #167 README cells rounded once from check.json
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bb96359317
ℹ️ 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".
| by_bv = { | ||
| r['BV']: r for r in rows if r['T'] == T and r['N'] == n and r['path'] == 'ring' | ||
| } | ||
| narrow, wide = by_bv[4], by_bv[32] |
There was a problem hiding this comment.
Require tile 4 before computing the threshold
When the documented CLI is invoked with an otherwise accepted subset such as --tiles 8 16 32, the parser permits it because validation only requires tile 32, but this unconditional lookup raises KeyError: 4 after the entire GPU sweep has completed. As a result, neither the normal nor failed report is written; either require tile 4 during argument validation or omit threshold calculation when it was not measured.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Valid; fixed in a3413f9: the parser now requires tiles 4 and 32 (the declared threshold compares them), so a subset such as --tiles 8 16 32 is refused at startup, before any GPU work, instead of losing the finished sweep to a KeyError. The commit job checked that --tiles 8 16 32 exits non-zero; the default run (4, 8, 16, 32) was never affected. The hold's worktree is re-pinned to a3413f9 while its ticket is still queued.
|
Verdict: REQUEST CHANGES at bb96359 One blocking item, and it is Codex's. Everything else is right; details below. Blocking
Checked at bb96359
|
…e declared threshold compares them (Codex on #185)
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a3413f96b1
ℹ️ 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".
| 'fastest_tile': min(by_bv, key=lambda bv: by_bv[bv]), | ||
| 'bv4_over_bv32': by_bv[4] / by_bv[32] if 4 in by_bv else None, | ||
| } | ||
| threshold = declared_threshold(rows, args.blocks, sorted(args.batches)) |
There was a problem hiding this comment.
Reject incomplete grids before computing the threshold
Accepted invocations such as --blocks 16 or --batches 2 4 8 still produce threshold.n_star, even though the declared rule requires the minimum of N*_16 and N*_8 and explicitly makes the N=1 result determine whether the threshold is zero. The former invocation silently omits N*_8, while the latter treats N=2 as the start of the winning prefix, so either can report a cutoff unsupported by the pre-registered measurements. Require both declared blocks and batch 1, or withhold the declared threshold when they are absent.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Valid; fixed in d9d2e02. The declared threshold is now computed only on the declared grid (blocks 16 and 8, batches 1, 2, 3, 4, 5, 6, 8, 12, 16, 24, 32, 48 and 64; threshold_for_grid). Any other grid, such as --blocks 16 or batches without 1, gets threshold: {n_star: null, reason: ...}, so a smoke run on a subset still writes its report but no cutoff. The README's declared-reading section lists the exact grid and says so, and a new test covers both incomplete grids. The hold's worktree is re-pinned to d9d2e02 while its ticket is still queued.
|
Verdict: REQUEST CHANGES at a3413f9 My blocking item from bb96359 is fixed: the parser now requires tiles 4 and 32, so a grid without them is refused before any GPU work, and the Codex thread has a reply. The hold worktree is re-pinned to a3413f9, and no sweep output exists yet. Blocking
Everything else from my bb96359 review stands: the rotation, the rule against the README and its test, |
…ocks 16 and 8, batches 1-64 as listed); other grids get n_star null with the reason (Codex on #185)
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d9d2e02009
ℹ️ 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".
| 'fastest_tile': min(by_bv, key=lambda bv: by_bv[bv]), | ||
| 'bv4_over_bv32': by_bv[4] / by_bv[32] if 4 in by_bv else None, | ||
| } | ||
| threshold = threshold_for_grid(rows, args.blocks, args.batches) |
There was a problem hiding this comment.
Withhold the threshold when repeat count is not four
When the declared blocks and batches are used with an accepted override such as --repeats 1, this call still emits a declared n_star. With one repeat, each range is zero and “faster in every repeat” reduces to a single timing comparison; with other counts, the rotation may also be unbalanced. This no longer follows the pre-registered four-repeat protocol and can turn noise into the cutoff used for the restricted patch, so threshold eligibility should require four repeats (or such runs should get n_star: null).
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Valid in general, but it does not change this sweep's data or decision, so per the integrator's policy it is folded into the results PR instead of moving the queued hold again. The hold (run_ring_tile_sweep.sh) calls the script with no overrides, so it runs the declared configuration: blocks 16 and 8, the declared batches, tiles 4/8/16/32, four repeats, 24 layers, 50 iterations. sweep.json records repeats, iters and shape.layers, and the rows record blocks, batches and tiles, so the results PR will check that the run used exactly that configuration before reading N*. The results PR will also extend threshold_for_grid to every declared parameter: blocks, batches, tiles 4 and 32, repeats = 4, layers = 24, iters = 50, with n_star: null listing the parameters that differ. The README's declared-reading section will then list the full configuration.
|
Verdict: REQUEST CHANGES at d9d2e02 The grid fix for Codex 4162785329 is correct and answered. Blocking
|
|
Verdict: APPROVE at d9d2e02 This supersedes my REQUEST CHANGES at this head (issuecomment-5945719868). Codex 4162912791 (a repeat count other than 4 still yields N*) has a scoped reply (4162918988), recorded in the PR body, and I verified the scope:
The deferral cannot change this sweep's data or decision. The results PR has committed to two things, and I will check both there:
Everything else from my earlier reviews of #185 stands. |
The reviewer's optional items on #180, made before the sweep runs (its exclusive ticket is still queued). This commit is the pre-registration: it declares how the batch threshold N* will be read, so a restricted version of patch 0005 cannot be tuned on noise.
Declared reading (
evidence/drafter/README.md, "Ring-writing verify tiles by batch: declared reading"; applied by the script asdeclared_threshold, written tothresholdinsweep.json):n_starnull with the reason.Sweep changes (
gdn_ring_tile_sweep.py,run_ring_tile_sweep.sh):sweep.failed.jsoninstead ofsweep.jsonand still exits non-zero. The hold script refuses to run over either file.check.json: block 16, c = 1, stock/fold y 870/887 (was 871/888); block 16, c = 2, ratio 1.011 (was 1.012). A note under the table says where the values come from.Run. The hold's worktree
~/vp-wt/drafter-run3is re-pinned to the PR head (d9d2e02) while the ticket is still queued; the hold has not started. Engine:engine/drafter9292abd874.Testing.
tests/test_drafter_tools.pyin the repository venv (the new test skips there without torch) and in the SGLang venv. The new test covers the threshold rule: a win must hold in every repeat and exceed the spread, and the threshold must be a prefix of wins and the minimum over the blocks.--helpin the SGLang venv.Review comments.
declared_thresholdread tile 4 unconditionally, so--tiles 8 16 32(accepted by the parser) would lose a finished sweep to a KeyError before any report was written. The reviewer raised the same item. Fixed in a3413f9: the parser requires tiles 4 and 32. The commit job checked that the subset is refused; tests pass (21 in the SGLang venv).--blocks 16, or batches without 1) still producedn_star. The reviewer raised the same item. Fixed in d9d2e02: the threshold is computed only on the declared grid, and other grids getn_starnull with the reason (threshold_for_grid, with a test). Tests: 19 passed + 3 skipped in the repo venv, 22 passed in the SGLang venv.--repeats 1) would still producen_star. The reviewer asked to close every such variant. This does not change this sweep's data or decision: the hold calls the script with no overrides, so it runs the declared configuration (four repeats, 24 layers, 50 iterations, all four tiles). Per the integrator's policy it is folded into the results PR, which will (a) check thatsweep.jsonrecords exactly the declared configuration before reading N*, and (b) compute the threshold only when every declared parameter matches, writingn_starnull listing the differences, with the full configuration in the README section.