Skip to content

ci(eval): score Gemma on Strix Point, refuse cross-model compares - #5511

Merged
kovtcharov-amd merged 7 commits into
mainfrom
ci/eval-gemma-strix-point
Oct 30, 2026
Merged

kovtcharov-amd merged 7 commits into
mainfrom
ci/eval-gemma-strix-point

Conversation

@kovtcharov-amd

@kovtcharov-amd kovtcharov-amd commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

The flagship scenario eval only measured Strix Halo, and a scorecard never said which local model produced it, so a Gemma run could be diffed against a Qwen baseline and report "regressions" that only measure the model swap. This adds a dispatch-only workflow that scores Gemma-4-E4B (what every smaller PC runs) on the Strix Point pool, pins and records the model in every scorecard, and makes --compare refuse (exit 3) a baseline captured on another agent model or eval model. It is the first half of #5505; moving Strix Halo to Qwen3.6 follows after v0.25.1 final.

  • Pool impact: Strix Point runs scenarios about 3x slower than Halo (error_recovery: 34 min vs 10.6). The pool ran jobs on five hosts on 10-21 and was idle about 97% of the time, so the default runs tool_selection, error_recovery, context_retention and adversarial, one category per machine, at most three machines at once and one run at a time: about 100 min wall clock.
  • Halo is untouched, apart from one deliberate change: comparing across two eval models now fails instead of warning. That hits the Halo compare step when a dispatch overrides eval_model, and anyone scripting gaia eval agent --compare locally across two judges (exit 3).
  • No baseline yet. gaia-flagship-gemma-stx/ declares its model and holds no scorecards until a real run produces them; until then each category reports NO BASELINE YET, never a pass. Its README has the capture steps.
🔍 Technical details
  • Design: a new reusable eval_scenario_lane.yml (one lane, parameterised by runner labels, model, categories, baseline dir), called by eval_flagship_gemma_stx.yml. eval_flagship.yml was left alone because its lane can't be re-validated without dispatching on Strix Halo while v0.25.1 is in flight; it moves onto the reusable lane with the Qwen baseline.
  • Pin: util/eval_gaia_home.py pin-model writes default_model into each category's fresh GAIA home and reads it back; gaia eval agent --agent-model checks each session's effective_model and turns a mismatch into INFRA_ERROR; the scorecard gets config.agent_model.
  • Category/scenario selection is ci(eval): targeted flagship dispatch by category and scenario #5513's (categories / scenarios inputs, EVAL_SELECT_*, multi-id --scenario); this PR's own --categories mode was dropped in the merge. The only addition is EVAL_ONE_CATEGORY_PER_LANE=1, which splits each selected lane into one lane per category. Dispatches fail on zero-token errors (exhausted quota), as in eval_flagship.yml.
  • Proposed, not enabled: push: tags: ['v*.*.*', 'v*.*.*-rc*'] once the baseline lands (commented in the workflow).
  • Dispatch needs the file on main, so the validation run came from a throwaway branch adding a push trigger to this branch's commit (since deleted).

Test plan

Refs #5505

The flagship eval only ran on Strix Halo, and a scorecard never said which
local model produced it, so a Gemma run could be diffed against a Qwen
baseline and report regressions that only measure the model swap.

- eval_flagship_gemma_stx.yml (dispatch only) scores Gemma-4-E4B on the Strix
  Point pool through a new reusable lane, eval_scenario_lane.yml. It holds one
  machine at a time and defaults to a ~90 min smoke set.
- Each category's GAIA home pins the model, `gaia eval agent --agent-model`
  checks every session ran it, and the scorecard records it.
- `--compare` exits 3 when the agent model or eval model differs from the
  baseline (meta.json when present); the judge mismatch was only a warning.
- gaia-flagship-gemma-stx/ declares its model and has no scorecards until a
  real run on the pool produces them.

eval_flagship.yml is unchanged and moves onto the reusable lane after v0.25.1.

Refs #5505
@github-actions github-actions Bot added documentation Documentation changes devops DevOps/infrastructure changes cli CLI changes eval Evaluation framework changes tests Test changes performance Performance-critical changes labels Oct 21, 2026
error_recovery took 34 min on Strix Point against 10.6 on Halo, so the
first default would have taken nearly three hours. The default is now
context_retention and error_recovery (about 85 min), tool_selection is
named as the first to add, and a hung lane frees its machine within four
hours instead of six.
@github-actions

Copy link
Copy Markdown
Contributor

Verdict: Approve with suggestions

This closes a real gap: --compare could diff a Gemma scorecard against a Qwen baseline and call the model swap a regression. Now each scorecard records the local model it ran, and the compare refuses a mismatch. I found no correctness, security or breaking-change problems. The pin is checked at both ends: the GAIA home reads the model back, and each scenario's session is checked against it. The tests cover pinned, unpinned, unreadable and mixed-model runs.

I checked the one path that could break the existing Strix Halo lane. That lane runs without --agent-model, but the agent-type check already turns any unreadable session into INFRA_ERROR. So a measured Halo scenario always records its model, and the run still names Gemma. That matches gaia-flagship/meta.json, so the Halo compare keeps working.

🟢 One nit. When the Halo workflow's compare is refused because the models differ (the new exit 3), it falls into the "harness/IO error" branch. That failure is the intended outcome, but the message points whoever reads it at the wrong cause. Giving exit 3 its own branch with the "measured with a different model" wording fixes it.

🔍 Technical details
  • .github/workflows/eval_flagship.yml compare switch (~line 1992): exit 3 reaches default, which prints "compare failed … (not a regression verdict - a harness/IO error)". eval_scenario_lane.yml already has a dedicated 3 { … NOT COMPARABLE … } arm. Copying that arm is a one-line change that doesn't touch the lane's logic, if you'd rather not wait for the Halo lane to move onto the reusable workflow.
  • Why an unpinned Halo run stays attributable: _stamp_agent_provenance runs before _stamp_agent_model and downgrades a PASS/FAIL whose session can't be read back to INFRA_ERROR. run_agent_model leaves those out, so the set of observed models only goes empty or mixed if effective_model itself resolves differently. No scenario under eval/scenarios/ overrides the model.
  • check_comparable now raises where _warn_on_judge_mismatch only warned. Two local runs scored by different --model judges are now refused instead of printed with a banner. That is intended and documented in docs/eval.mdx; it's worth a line in the release notes for anyone who scripts --compare locally.

@kovtcharov-amd

Copy link
Copy Markdown
Collaborator Author

Leaving the exit-3 arm out of eval_flagship.yml on purpose: that file stays untouched while v0.25.1 is in flight, and it gets the dedicated arm for free when its lane moves onto eval_scenario_lane.yml with the Qwen baseline. Until then a refused compare there still fails the step, and the compare's own output above the error names the model mismatch. The local --compare behaviour change is now called out in the description.

The Gemma workflow now selects categories and scenarios through the
same inputs and validation as eval_flagship.yml (util/eval_lane_matrix.py),
replacing its own --categories mode. It adds one switch,
EVAL_ONE_CATEGORY_PER_LANE, so each category gets its own machine, and the
lane fails a dispatch on an exhausted Claude quota as the flagship does.

The Strix Point pool ran jobs on five hosts on 10-21 and was idle about 97%
of the time, so the default grows to tool_selection, error_recovery,
context_retention and adversarial on at most three machines (~100 min).
test_email_agent_unit.yml runs tests/unit/eval, which now reads the two new
eval workflows and both flagship baseline directories. test_unit.yml's
installer tests read hub/agents/gaia/npm/binaries.lock.json, which main's
path-coverage check already flags; without it lint stays red on every PR.
grtninja pushed a commit to grtninja/gaia that referenced this pull request Oct 22, 2026
…#5535)

Every RC tag ran the whole flagship sweep: about 28 Strix Halo
machine-hours, 13 of 14 machines for 3.3 h, and an estimated 130M Claude
tokens, more than two accounts delivered on rc2. Now an RC runs a
30-scenario smoke tier on 3 machines, only the RC you nominate for
promotion runs the full sweep, and a final tag checks that sweep exists
instead of re-running it. The Strix Halo pool also starts scoring
Qwen3.6-35B-A3B, the model `gaia init` installs on that hardware,
against its own baseline. Implements the "Cost and tiering" section of
amd#5493.

| Per release cycle (3 RCs + final) | Before | After (amd#5493 estimates) |
|---|---|---|
| Strix Halo machine-hours | ~113 (4 full sweeps) | ~37 (2 smokes, 1
full sweep, 2 weekly backlog runs) |
| Claude tokens | ~520M | ~170M |
| A non-promoted RC | 13 machines, 3.3 h, ~130M tokens | 3 machines, ≤1
h target, ~19M tokens |

**Measured on rc2's commit:** the smoke took 3 machines, 2.0
machine-hours and 45 min wall time
([run](https://github.com/amd/gaia/actions/runs/39668506957)). rc2's own
full sweep took 13 machines, 22.1 machine-hours (cut short when the
quota ran out) and 2 h 38 min. The smoke ran before amd#5525 started
recording real Claude usage, so the token figures stay estimates; the
next tier run will measure them.

**Worth a look:** on Qwen the smoke passed 27 of 30. The 3 failures are
all protected refusal scenarios that pass at least 93% on Gemma:
`files_sandbox_refusal_system`, `mem_credential_refusal`,
`shell_denial_reported_as_denial`. It's one run, so re-run before
calling it a Qwen regression.

- **Tiers.** RC tag → smoke. `[full eval]` in an RC's annotated tag
message (or `-f tier=full`) → full sweep. Final tag → verify only.
`[skip eval]` still works.
- **Weekly backlog lane**, Sunday 06:17 UTC, 3 machines: the 26
non-protected always-fail scenarios (which leave the full sweep) plus
the 15 noisiest (which stay in it), with a rolling trend artifact so
progress toward 80% is visible. It skips itself while any other flagship
run holds the pool. Owner: @kovtcharov-amd.
- **Nothing drops out.** Protected scenarios (security, honesty,
injection, adversarial, error recovery, resilience) never leave the full
sweep, and a check proves smoke + full + backlog still cover all 343
runnable scenarios.
- **Qwen on Halo, compared only with Qwen.** Its baseline is empty until
a real full sweep fills it, so runs say "no Qwen baseline yet" and never
fall back to Gemma's. A dispatch can still pick `-f
model=Gemma-4-E4B-it-GGUF` to re-run part of a Gemma tag run, as rc3
does. Gemma moves to the Strix Point pool (amd#5511); the Halo full sweep
keeps no Gemma coverage by default.
- **Quota exhaustion fails every run now**, tag runs included (the
zero-token check from amd#5513).

## Test plan
- [x] `pytest tests/unit/eval tests/unit/test_eval_tag_gate.py
tests/test_eval.py`: 1686 passed, 30 skipped
- [x] `python util/eval_tiers.py check`: 343 of 343 runnable scenarios
covered; 18 never-in-CI scenarios listed with their reason
- [x] `python util/lint.py --all` passes; actionlint reports only the
existing runner-label notices
- [x] Tiny Qwen dispatch on rc2's commit
([run](https://github.com/amd/gaia/actions/runs/39660896807)): judged
PASS, session ran Qwen3.6 as pinned, compare reported "no Qwen baseline
yet". The first try caught a warm pull that never happened and stopped
in preflight; fixed in this PR
- [x] Smoke tier on rc2's commit 0b14d74 plus this PR's harness
commits ([run](https://github.com/amd/gaia/actions/runs/39668506957)): 3
machines, 45 min, 30 scenarios all on Qwen, no zero-token errors

<details>
<summary>🔍 Technical details</summary>

- The first commit is amd#5511's pin-and-refuse core, taken verbatim
(`eval_gaia_home.py pin-model`, `gaia eval agent --agent-model`,
`--compare` exit 3 on a model mismatch) so both branches carry one
implementation. amd#5511's Strix Point workflow, reusable lane and
lane-matrix changes are left to it. Whichever lands second drops the
duplicate hunks.
- `eval/ci_tiers.json` holds the smoke and backlog machines, each
scenario's `why` (pass rate, runs, timeouts, protected reason), the
model → baseline map, and the owner. `util/eval_tiers.py` decides the
tier, builds the matrix (reusing amd#5513's scenario selection), checks
coverage from the matrices it would emit, and verifies a final tag
through a 90-day `flagship-tier-full` marker artifact.
`util/eval_backlog_trend.py` rolls the trend forward.
- A smoke machine holds `memory` beside other non-gaia categories; the
job runs with memory off and turns the store on for `memory` alone
(`EVAL_MEMORY_CATEGORIES`), so no category runs under different
conditions than in the full sweep.
- Outcomes (`gaia eval tasks`) runs only with the full sweep, to keep
the smoke at 3 machines.
- Gemma on Strix Point: `python util/eval_tiers.py scenarios --tier
smoke` prints the same 30 ids. Point runs scenarios about 3x slower, so
the full smoke is roughly 4 h on one Point machine, or about 2 h for the
13 protected ones.
- rc3 is unaffected: a dispatch on `--ref v0.25.1-rc3` runs the workflow
as it is at that tag.
</details>
v added 2 commits October 30, 2026 10:42
#5535 landed this PR's model pin and cross-model compare refusal on main,
so runner.py and cli.py take main's version. The Gemma-on-Strix-Point lane
stays. Drops a duplicated binaries.lock.json trigger in test_unit.yml and a
duplicated gaia-flagship/** trigger in test_email_agent_unit.yml, and updates
notes that still said Strix Halo would move to Qwen after v0.25.1.
@kovtcharov-amd
kovtcharov-amd added this pull request to the merge queue Oct 30, 2026
Merged via the queue into main with commit c980cce Oct 30, 2026
34 of 35 checks passed
@kovtcharov-amd
kovtcharov-amd deleted the ci/eval-gemma-strix-point branch October 30, 2026 18:22
kovtcharov-amd added a commit to tylerbea/gaia that referenced this pull request Oct 30, 2026
…reach (amd#5653)

Of the last 150 bug fixes, 147 shipped a regression test, yet CI caught
only about 7 of those bugs before users or RC testing did. Each test
guards the one call site that broke, and the next site with the same
flaw ships untested. Meanwhile every PR ran all ~27k unit tests on three
operating systems, even for a docs edit, and most main-branch runs were
cancelled before they finished. This PR guards the recurring bug shapes
everywhere, fixes a real bug the new tests found, and makes a PR run
only the tests it can affect.

- **Guards for the shapes behind most recent fixes.** A ratchet counts
subprocess and HTTP calls with no timeout, kill-by-image-name, and
`except Exception` bodies that only pass or return a placeholder.
Existing sites are grandfathered, new ones fail CI, and fixing one
lowers the count.
- **Folder grants were lost when several GAIA processes saved at once.**
A four-process test lost 96–98 of 100: the read-modify-write had no
lock, and a torn read "rebuilt" the file from empty. It is now locked
and atomic. Six runtime calls that could hang forever now time out, with
actionable errors.
- **PRs run only the reachable tests.** `util/select_tests.py` combines
a nightly per-test coverage map with static rules for what coverage
can't see. Windows and macOS run the OS-touching subset of that. The
median PR runs about a quarter of the suite. On ~1,150 recent commits,
it selected every bug fix's own regression test from the fix's source
changes alone.
- **Full coverage moves to main and nightly.** Every push to main runs
the full suite on Linux and now finishes instead of being cancelled. The
nightly run covers all three operating systems and rebuilds the map. The
frozen flagship binary also builds on packaging PRs and weekly, not only
at an RC.
- **Duplicates trimmed.** The email unit lane no longer re-runs ~90
files `test_unit.yml` already covers, and the warning-only C++
benchmarks run on main instead of every PR.

Also unbreaks main's TUI build: amd#5464 documented the desktop app's
`gaia` shim in backticks, and the TUI doc check only exempted it before
a space, so every PR's TUI checks went red. The shim is the Python
CLI's, so the exemption now accepts any punctuation after it.

Trade-offs to know: a Windows- or macOS-only bug outside the OS-touching
subset surfaces at the nightly run, not on the PR, and PRs no longer
upload partial coverage to Codecov. To run the full suite on a branch,
dispatch `test_unit.yml` on it.

## Test plan
- [x] `pytest tests/unit/test_select_tests.py
tests/unit/test_process_safety_ratchet.py
tests/unit/test_allowed_paths_concurrency.py`: 26 + 33 + 1 passed; the
concurrency test fails on the old code (96–98 of 100 grants lost)
- [x] Full `tests/unit` locally: 27,501 passed; 26 failures that fail
identically on main in this environment (PATH-installed `gaia`, real
wheel installs)
- [x] `python util/lint.py --all` passes, including the lane-coverage,
path-coverage, trigger and ancestor-skip checks
- [x] Selector replayed over ~1,150 recent commits with a map built from
a real `--cov-context=test` run
- [ ] After merge: the first nightly run saves `unit-test-map-*`, and
the next PR's "Select unit tests" summary reports a map-based selection

<details>
<summary>🔍 Technical details</summary>

- Static rules: module-level imports (transitive); every import and
module-naming string in tests and tooling (transitive); filename strings
and directory scans (one hop); nested `conftest.py`; top-level fixtures
by requested name, through fixture chains; autouse isolation fixtures
(one hop); CLIs run with `python -m`, whose lazy imports coverage can't
see. A package `__init__` reaches everything below it when it changes,
but the walk never continues through one.
- Full-run triggers: any `conftest.py`, packaging or pytest config, the
selector or `test_unit.yml`, and any deleted or renamed file (`git diff
--no-renames`). So does a selection over 70% of the suite.
- With no map (a cache miss), function-level imports are followed too
and the job summary says so; a map over 3 days old raises a warning.
- A push diffs against the last commit a successful main run tested, so
merges whose runs were dropped while pending still reach Windows and
macOS. The event name is in the concurrency group, so a push can't drop
the nightly.
- Known blind spot, documented in `docs/reference/dev.mdx`: code behind
a cache or shared fixture is credited in coverage only to the first test
that ran it.
- Open PRs touching the same files (amd#5453, amd#5417, amd#5511, amd#5600, amd#5475,
amd#5542, amd#5558) test-merge cleanly against this branch; none gains a
conflict from it.
</details>

---------

Co-authored-by: Kalin Ovtcharov <[email protected]>
Co-authored-by: v <v@x>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI changes devops DevOps/infrastructure changes documentation Documentation changes eval Evaluation framework changes performance Performance-critical changes tests Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant