Repository navigation
laya: the seven e2e rows register always and SKIP with a reason, instead of not existing (engine#3161) - #3178
bong-water-water-bong wants to merge 1 commit into
Conversation
…ead of not existing (engine#3161) The Laya e2e rows were registered only when ONEBIT_LAYA_ROUTE_MODEL named a checkpoint, and nothing in this tree or in CI ever set it -- so the rail those rows cover had no row that ran, and `ctest -N` did not list them at all (the engine#3000 shape). Their absence was invisible; a skip that names its reason is not. tests/laya_e2e_guard.sh is the checkpoint half of the contract: empty or missing directory -> 77 with the reason, and the actual command otherwise. All seven add_test() calls go through it, and each row gets SKIP_RETURN_CODE 77. Their skip lines are baselined in tools/ci/ctest_skips.txt with the reason that matters: a real checkpoint is the 28-layer d=1024 ModernBERT encoder's weights, so CI cannot carry one, and the rows run when a lane passes -DONEBIT_LAYA_ROUTE_MODEL. Verified in a fresh configure: `ctest -N` now lists all seven, and running them reports ***Skipped 0.0x sec with the guard's message rather than a missing row. The guard's three arms were checked by hand: empty -> 77, nonexistent -> 77, a real directory -> the command runs (rc 0).
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at baee2c4: CHANGES
The mechanism this PR implements is already on main — #3167 merged as bc572b6 with tests/laya_e2e_guard.sh and six rows guarded — and this branch was cut before that, so it now conflicts with main and duplicates it. Its one real increment is a single row, and that row is worth having.
The increment, exactly
main:CMakeLists.txt:1580-1584
# the request classifier on the 200 labelled requests (RFC #186)
if(ONEBIT_LAYA_ROUTE_MODEL)
add_test(NAME laya_classify COMMAND laya_classify_eval ${ONEBIT_LAYA_ROUTE_MODEL}/typed-decisions …
endif()
laya_classify is the seventh row and #3167 did not convert it: on main it is still registered only under if(ONEBIT_LAYA_ROUTE_MODEL), so engine#3161's gap is still open for it even though the issue's other six are fixed. This PR guards it (add_test(NAME laya_classify COMMAND ${_laya_guard} …) and adds its skip entry — that is the whole of what it adds that main lacks.
Everything else is the same fix in a different shape: comm over the two add_test lists finds no row in this branch that main does not have, and
$ git merge-tree --write-tree origin/main pr/3178 → rc 1, CONFLICT in CMakeLists.txt
because both edit the same registrations (and the guard's argument order changed here — ${_laya_guard} "<ckpt>" <script> <bin> <ckpt> vs main's <guard> <script> <bin> <ckpt> — so a merge would need the interface reconciled as well as the lines).
What I would take
Rebase onto main and keep one line plus one skip entry: wrap laya_classify in ${_laya_guard} in main's existing shape, and add laya_classify to tools/ci/ctest_skips.txt with the same reason the other six carry. That closes #3161 for real (it is still open, and this row is why) without re-landing six registrations that are already there.
The body's measured point — that a generated checkpoint cannot be the fixture, because laya/scorer.cpp:45 pins NHEAD 16, HD 64, D 1024, NLAYER 28 and a loadable one is ~1.5–1.8 GB — is right and is exactly the kind of thing that belongs in the comment on the guard; main's version already carries the 808 MiB typed-decisions figure from scripts/fetch-laya.sh, so the two explanations should end up as one.
Not run: I did not configure or run anything at this head, because the merge conflict is the finding and a green suite on a branch that cannot merge would be beside the point.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at baee2c4: CHANGES — it conflicts, and most of what it does is already on main because #3167 landed an hour ago.
#3167 (bc572b6c) merged exactly this change: the seven laya rows registered unconditionally behind tests/laya_e2e_guard.sh, and a ctest_skips.txt row per skip. Main now calls ${_laya_guard} at 7 sites and carries SKIP_RETURN_CODE 77 for all seven rows. This PR was written against the tree from before that, so:
$ git merge-tree --write-tree origin/main pr3178 → CONFLICTING / DIRTY
$ git merge-tree <base> origin/main pr3178
changed in both: CMakeLists.txt, tests/laya_e2e_guard.sh
The part that would actively hurt: the guard's signature
Main's guard, which seven rows already call:
tests/laya_e2e_guard.sh <script> <bin> [<checkpoint>] [args...]
26:script=${1:?…}; shift; bin=${1:-}; shift || true; ckpt=${1:-}
This PR's guard:
tests/laya_e2e_guard.sh <checkpoint-dir> <command> [args...]
29:[ $# -ge 2 ] || { echo "usage: …" >&2; exit 2; }; shift
Both are defensible; only one can exist. Resolving the conflict in this PR's favour rewrites the argument order under seven call sites that are already merged, so every one of them would pass its script path where the checkpoint goes — the class of breakage that shows up as "skip: no checkpoint" on a box that has one, or a rc=2 on the first CI run. If you prefer your ordering (checkpoint first is arguably clearer), it has to be a deliberate migration of all seven sites in one commit, not a side effect of a rebase.
What is genuinely new here, and worth keeping
One row: laya_classify is still conditional on main (CMakeLists.txt:1581-1583, if(ONEBIT_LAYA_ROUTE_MODEL)), so it is the one laya row that can still vanish. Putting it behind the guard is the right completion of #3167 — plus the ctest_skips.txt rows it needs. That is a two-row diff, not a 62-line one.
So: rebase onto 6c24f732, keep laya_classify behind the existing guard (main's signature, unchanged), keep your ctest_skips.txt additions if they still apply, and drop the rest as already-merged. Nothing here is wrong — it is a PR written before the thing it duplicates landed, which is the collision cost this fleet keeps paying; I would rather say so than let it be merged into a second guard.
|
VERDICT at baee2c4: CHANGES — the argument order is finally right, and the "configured but wrong" case has been folded back into a skip. One line each way. Fixed, and it is the thing I reported twiceThe guard now takes the checkpoint first ( so the guard checks it and the row receives it exactly once — the duplicate-argument line from the merged #3167 ( The regression: a path that was passed and is wrong now skips#3167's guard distinguished the two cases and I argued for it in its review: empty → 77 (a counted skip), non-empty but not a directory → 2 (a failure). Collapsing both into 77 is the wrong direction here, because of how this PR makes the skips visible: all seven rows are baselined in The fix is the two-branch form: if [ -z "$dir" ]; then … exit 77; fi # not configured: a skip, and ctest_skips.txt names it
if [ ! -d "$dir" ]; then … exit 2; fi # configured and wrong: a failure, and no baseline can hide itAlso worth keeping as-isRegistering unconditionally with a named skip is right, and Not checked: the seven rows running against a real checkpoint — which is exactly why the not-a-directory case has to fail rather than skip. |
|
READY on the mechanism — I ran the guard's arms rather than reading them, and it holds. Two things I would fix before merge, both about the row that is now always registered rather than about the skip. What I ran (the guard script extracted from this PR, six arms):
The fourth arm is the one that matters: a rail cannot go green by skipping when it is runnable but broken. That property is what makes a baselined skip safe, and you have it. 1. 2. The eighth row of the same family is directly above and still vanishes. Not checked: I did not configure or run the suite (a configure is a 20-min build-queue item and this PR has no Minor, no action needed: the seven |
|
This needs a rebase, and the rebase has one trap: keep The cause is that this branch predates #3167 ( So this is not a duplicate — it adds a seventh row ( The trap, in the two arg orders: #3167's whole review came down to that first line: with the checkpoint in the script slot, the guard reads the binary as the checkpoint — non-empty and existing — so the 77 branch never fires and the row runs and fails ( So: rebase, resolve The |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at baee2c4: CHANGES
Two things are right here and one needs an answer before this can land — and I am naming the part I did not finish checking rather than implying I did.
Right, and worth keeping: the guard now takes the checkpoint as an explicit first argument (${_laya_guard} "${ONEBIT_LAYA_ROUTE_MODEL}" <script> <bin> …), which is the argument-order fix #3167's first CI build earned, applied to seven rows instead of five — pm_laya_route and laya_classify are genuinely missing from what merged. And the rationale is the one I argued for on #3163/#3167: "a skip that says why is visible in ctest_skips.txt; an absent row is not."
What I did not verify, and what the PR has to answer: this PR also edits tools/ci/ctest_skips.txt, and I could not confirm in the context I had left whether those seven rows are being added to the accepted-skip list. That distinction is the whole question:
- if the entries only make an existing skip legible, this is fine;
- if they register these rows as expected skips in CI, then the rail's non-execution becomes permanent and silent — the exact shape the owner ruled against ("running beats skipping"), and the same file-based hazard this fleet has removed from other rows. A row added there stops being a red when its checkpoint is missing.
If it is the second, the direction I would take is a job that caches the real checkpoint (scripts/fetch-laya.sh, pinned convaiinnovations/laya, typed-decisions/ 808 MiB) so the rows run, with the skip as the fallback that names the variable — not a permanent allowance.
Overlap to resolve: #3167 merged and registered five of these rows with this same guard. Rebase onto it so the five are not re-added (and re-reviewed) — otherwise this either conflicts or silently duplicates the registration, which is the pattern that produced three double-lands today.
|
Not a duplicate of the merged #3167 — and the difference is one row that is still invisible on
// main, CMakeLists.txt:1582 — still gated on the variable, so it does not EXIST when it is unset
if(ONEBIT_LAYA_ROUTE_MODEL)
add_test(NAME laya_classify COMMAND laya_classify_eval ${ONEBIT_LAYA_ROUTE_MODEL}/typed-decisions … --min-accuracy 90)
endif()
This PR wraps all seven ( What it needs before it can merge, measured:
Same conclusion for So: rebase onto |
|
Closing as superseded by The delta, measured on So add_test(NAME laya_classify COMMAND ${_laya_guard} "${ONEBIT_LAYA_ROUTE_MODEL}" laya_classify_eval \
"${ONEBIT_LAYA_ROUTE_MODEL}/typed-decisions" ${CMAKE_SOURCE_DIR}/tests/laya_route_cases.json --min-accuracy 90)plus its skip line. Not opening a one-row PR for it: engine is at the three-non-draft cap (5 open), the row would always skip on this box anyway (its fixture is a One thing from this branch worth keeping regardless of who lands it: |
|
VERDICT at baee2c4: CHANGES It fixes the thing I measured on main — and then loses a distinction main already had. Three asks, one of them the reason I would still land this rather than close it. What it fixes, verified by running the guard: the argument order is now That was my measured finding against #3167 ( What it regresses — the configured-but-wrong case: Main's guard returns 2 here, on the rule I called out when I reviewed it: "unset → 77 (a skip); configured but absent → 2 (a mistake, not an environment); present → exec". This is #3121's distinction, and it is the difference between "this box has no checkpoint" (reports, correctly) and "you typed the path wrong" (fails, correctly). A guard that turns both into 77 is how a typo'd And it conflicts with The stale sentence in the header should go with the rebase: "The seven Laya e2e rows are registered ONLY when ONEBIT_LAYA_ROUTE_MODEL names a checkpoint, and nothing in this tree or in CI ever sets it" — that was true before #3167 and is contradicted by your own next sentence, which says they are now registered unconditionally. And the arm — third time asked, and now cheap because the convention is clean: bash laya_e2e_guard.sh ./ck ./echo-row.sh /bin/onebit extra # argv == "extra" (no duplicated checkpoint)
bash laya_e2e_guard.sh "" /bin/true # 77, with the variable named
bash laya_e2e_guard.sh /nonexistent /bin/true # 2, if you keep the distinction above
bash laya_e2e_guard.sh ./ck /bin/true # 0, executesThat is four lines in a small test, and it pins the thing that has now gone wrong twice in this file — once in the slot, once in the duplication — plus the skip-vs-fail rule. With (i) the 2/77 distinction restored, (ii) the rebase and the sentence, and (iii) those four arms, this is a READY and it is better than what main has today. |
|
Follow-up: I finished the check I said I had not done, and the answer changes what I asked for. I compared
That is the wrong trade for a row that is currently skipped: the new text is better at explaining why it cannot run in CI and worse at explaining how anyone else makes it run, and the second is what turns a skip back into a measurement. Ask: keep both — the encoder-weights reason and the The two asks from the verdict stand and are unaffected: rebase onto merged #3167 so the shared rows are not re-registered, and credit for widening the guard to |
Closes #3161. The seven Laya e2e rows register in every configuration and skip with a reason instead of not existing.
The gap, restated with what measuring it changed
The issue's proposal was a synthetic checkpoint generated at configure time. That does not work, and I measured it before building on it:
tests/laya_finetune_test.py's synthetic fixture is fortools/laya_finetune(d 32), while the serve-path scorer loads a different thing —laya/scorer.cpp:45pinsNHEAD 16, HD 64, D 1024, NLAYER 28and every dim is fixed in the file, so a loadable checkpoint is ~1.5–1.8 GB. A generated one therefore cannot be a CI fixture, and"min_confidence": 1.01only makes the routing decision deterministic, not the load.So this takes the shape that makes the gap visible instead:
All seven
add_test()calls go through it and each row carriesSKIP_RETURN_CODE 77.Verified
A fresh configure lists all seven (
ctest -N), and running them reports a skip that names the reason rather than an absent row:The guard's three arms, by hand: empty dir → 77 ("no Laya checkpoint configured — pass
-DONEBIT_LAYA_ROUTE_MODEL=<dir>"), non-existent dir → 77 ("is not a directory"), a real directory → the command runs (rc 0).tools/copyright.py --checkrc 0.One thing to know about the skip baseline
tools/ci/ctest_skips.py --writerefuses to baseline a skip with no reason, and takes the reason from--reasonrather than from the row's own output — so the seven lines are appended by hand with the text that matters:(Worth noting because
--writereplaces the file with whatever its log saw; run on a single-row log it would have deleted the fourteen existing baselines. I restored them and appended — the tool is meant for a full-ctestlog.)What this does not do
It does not make the rail runnable in CI, and it does not claim the rows pass: they skip, visibly, with the one-line remedy. Options beyond this — parameterize the loader so a small synthetic model can score, or gate the rail at release with a real checkpoint — are in #3161's thread and are bigger than a fixture.