Skip to content

test(accept): ATOMesh multimodal acceptance harness core, MMStar, MMMU-Pro, image distinction - #3414

Closed
junyyang-amd wants to merge 6 commits into
junyyang/mm-epd-m3from
junyyang/mm-epd-h1
Closed

junyyang-amd wants to merge 6 commits into
junyyang/mm-epd-m3from
junyyang/mm-epd-h1

Conversation

@junyyang-amd

@junyyang-amd junyyang-amd commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Ready for review. PR 8 of 11 in stack #3699: #3410 → #3407 → #3411 → #3412 → #3413 → #3408 → #3409 → this PR → #3415 → #3416 → #3417. Stacked on #3409; this PR's diff is its own change only. GPU-only; nothing in the CPU suite runs it.

Why

ATOMesh is gaining image chat for MiniMax-M3.1 and Kimi-K3.1 as a single instance, 1P1D and E/P/D; this series replaces #3371, and #3417 is its design. Before this PR, nothing ran an image benchmark through ATOMesh. An M3.1 MMStar score behind ATOMesh had no direct-server score to be held to, and nothing checked that a red and a blue image under one prompt got different answers and routing keys.

What changed

flowchart LR
  A["accept.sh model topology check"] --> B["models/m31.env (recipe server)"]
  A --> C{"topology"}
  C -->|direct| D[ATOM server]
  C -->|single| E["ATOMesh, cache_aware"] --> D
  A --> F["client container: checks/check.py"]
  F --> G["JSON line, PASS or FAIL"]
  G --> H["results/model/topology/check.json<br/>(later runs' reference)"]
Loading
  • accept.sh brings up one container per role over ssh, runs the check in a client container, prints one JSON line and PASS or FAIL, and removes its containers at exit.
  • The mmstar check passes on single when no request failed and the score is within 2 standard errors of the recorded direct score.
  • The mmmu_pro check scores standard and vision against the recipe's 0.791 / 0.682, sending MMMU-Pro's own vision prompt and reading its last Answer: X line.
  • The distinct check sends one prompt with a red, then a blue image, with prefix caching on, and requires each answer to name its own color and the two routing key_hash values to differ.

Review focus

  • Under mmmu_pro, lmms-eval's own vision task sends an empty text and scores the whole response; the check replaces both (vision_task_dir, answer_line_letter).

Testing

The harness measured M3.1 behind ATOMesh at the direct score and the recipe's MMMU-Pro scores, with no failed request.
CPU unit suite green except test_mxfp4_apply_hands_the_shared_output_to_fused_experts, which fails the same way on main (from #2713).

Follow-ups

Evidence

Acceptance on the fork's EPD @ 8e00a49, from wuhuikx/LLM-Booster#455:

  • bash tests/accept/atomesh_mm/accept.sh m31 single mmstar: 0.7073 against direct 0.7227, 0 failed requests.
  • bash tests/accept/atomesh_mm/accept.sh m31 single mmmu-pro: standard 0.7844, vision 0.6931, against the recipe's 0.791 / 0.682.

The distinction check reads ATOMesh's routing decision debug event (key_hash), which launch_mesh enables through RUST_LOG.

🤖 Generated with Claude Code

…U-Pro, image distinction

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

🏷️ CI Guide

Runs automatically on every eligible PR before approval:

  • ✅ Pre Checkin: Black, Ruff, catalog schema validation, non-GPU unit tests

Heavy model tests:

  • ✅ Gate checks are published on every PR so required checks do not stay missing
  • ✅ Expensive jobs run only after the PR is approved, or when a matching ci:* label is present
  • ✅ Pre Checkin must pass before approved heavy jobs continue
  • ✅ Without a matching label, expensive jobs also require a relevant path
  • ✅ A matching ci:* label is an explicit request and can open the gate even when paths would otherwise skip it

Path scope:

  • Native ATOM, vLLM, and SGLang use ignore lists: docs/markdown and unrelated plugin or Mesh paths are skipped
  • ATOMesh uses an include list: Mesh code, ATOMesh scripts/workflows/catalogs, OpenAI entrypoints, and Slurm helpers
  • Relevant path alone does not start expensive jobs; approval still opens the automatic path-scoped gate
Label Tests
ci:full Run all heavy PR model tests: native ATOM, vLLM, SGLang, and ATOMesh
ci:atom Run native ATOM model accuracy tests
ci:vllm Run ATOM vLLM OOT model accuracy tests
ci:sglang Run ATOM SGLang model accuracy tests
ci:mesh Run ATOMesh accuracy/benchmark gates for Mesh-related changes

Without a matching ci:* label, heavy jobs are skipped when the path is not relevant or the PR is not approved.
Add labels via the sidebar or gh pr edit 3414 --add-label <label>

@valar-cop valar-cop 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.

some changes needed..

accept.sh run for mmstar, mmmu-pro and distinct at this head? and an ATOMesh log sample with the routing fields distinct.py parses?

ci green.

own fields (not its span's)."""
events = []
for line in log.splitlines():
_, mark, fields = ANSI.sub("", line).partition("routing decision")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

ATOMesh logs 'Selected worker', not 'routing decision', and only with --route-log-sample-rate > 0 which launch_mesh never passes. so this always sees 0 events. no key_hash field exists either..

Comment thread tests/accept/atomesh_mm/lib.sh Outdated
echo "${!name:-}"
}

cname() { echo "epd-${ACCEPT_ISSUE}-$1"; }

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

cname only keys on ACCEPT_ISSUE, but m31.env tells people to use PORT_BASE to share a node. two runs collide and cleanup rm -f the other run's container. include PORT_BASE in the name and append to CONTAINERS only after docker run succeeds?

"score": score,
"stderr": stderr(score, n),
"n": n,
"failed_requests": failed_requests(samples[task]),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

failed_requests never added to failures, unlike mmstar. with n~1730 a few failed requests still pass the 2*stderr. add it or say why tolerated?

LMMS_EVAL_MAIN = """
import json, sys
import openai
import lmms_eval.models.simple.openai as backend

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

does --model openai really resolve to lmms_eval.models.simple.openai at the pinned ref? if not the patch does nothing and top_p 0.95 never reaches the server. please confirm and assert the patched client is used..

@valarLip valarLip left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

⚠️ Action required before merge (6)

  1. Don't land a personal, unwired harness; put it on the existing CI path or keep it out of the tree. Nothing in .github/ runs tests/accept/atomesh_mm/, and models/m31.env:10-19 defaults to /share_nfs/junyan_tmp_r120/... and host pit2-p03-g07 (plus the ACCEPT_ISSUE=2 naming in accept.sh:23, and the runtime pip install jsonschema image workaround in lib.sh launch_atom). The repo already has .github/scripts/atom_mmstar_ci.sh + atom-mmstar-ci.yaml (lmms-eval MMStar) and atomesh-accuracy-validation.yaml (ATOMesh accuracy). Extend those with a mesh-fronted MM model entry (MMStar/MMMU-Pro), or attach the run results to #3407/#3410 instead of committing this.
  2. Declare or remove the dependency on unmerged #3407. checks/distinct.py:83 parses a routing decision event with key_hash, and lib.sh enables mesh::core::placement::policy_apply=debug. On main that module logs nothing and no key_hash field exists; #3407 adds both. On its own, distinct always fails with "0 routing decision events" (valar-cop). It also can't pass on direct (there's no mesh.log), so reject that combination up front.
  3. Gate the direct MMStar run on an absolute score. checks/mmstar.py main(): when REF_TOPOLOGY is empty, the only failure is failed_requests, so a 0% run PASSes and then becomes the reference for single. Add a per-model threshold, as atom_mmstar_ci.sh does with MMSTAR_THRESHOLD.
  4. Fail MMMU-Pro on failed requests. checks/mmmu_pro.py:107 records failed_requests but never adds them to failures (mmstar does). Also take the tolerance from the reference, not from the run under test: 2 * stderr(score, n) at :102 grows as the score falls. It also ignores REF_TOPOLOGY, so single is compared with the recipe and not with direct (valar-cop).
  5. Make concurrent runs safe. lib.sh:28 names containers only by ACCEPT_ISSUE, while m31.env says to use PORT_BASE to share a node. lib.sh:57 adds the role to CONTAINERS before docker run, so when the second run's run fails on the name clash, its cleanup runs rm -f on the first run's container. Confirmed by probe. Put PORT_BASE in the name and append only after run succeeds (valar-cop).
  6. Move the shared helpers out of checks/mmstar.py. mmmu_pro.py and distinct.py import env/finish/run_check/run_lmms_eval from a check module. Move them to a _common.py and add CPU unit tests for the pure helpers (answer_line_letter, decision_events, accuracy, names).

Also, in the PR body: post one accept.sh run per check at this head, and an ATOMesh log sample with the fields distinct.py parses (valar-cop).


Reviewed at 236ded5. Checked and not an issue: valar-cop's lmms-eval patch question (mmstar.py:39). At pin 4510f3e, --model openai resolves to models.chat.openai.OpenAICompatible, which subclasses models.simple.openai.OpenAICompatible. That class builds its client through the patched module-global OpenAI, so top_p reaches the server. Adding an assert would still help.

@valar-cop

Copy link
Copy Markdown

@zufayu
zufayu self-requested a review November 17, 2026 01:02
@zufayu zufayu self-assigned this Nov 17, 2026
@zufayu

zufayu commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

I checked the current state at 236ded5 and agree with Lingpeng’s requested changes. This head is not ready for approval.

The green workflow conclusions are not GPU validation for this harness: the actual ATOMesh accuracy and benchmark jobs were skipped in both the original and review-triggered runs. Also, #3407 is still open, changes-requested, and conflicting, so the distinct check cannot land independently.

Please take the following path:

  1. Keep this host-specific, unwired harness out of the tree for now and attach the run results to feat(mesh): key routing by image identity and log the media count per selection #3407/feat(engine): multimodal PD through the chat path #3410. If we want it as a maintained repository feature, follow up with an integration into the existing MMStar/ATOMesh CI paths, without personal host or NFS defaults.
  2. Split distinct out until feat(mesh): key routing by image identity and log the media count per selection #3407 lands. If it remains here, declare the dependency explicitly and reject the unsupported direct + distinct combination.
  3. Address the remaining correctness and maintainability items from Lingpeng’s review: the MMStar absolute threshold, MMMU-Pro failure/reference handling, concurrent-run-safe container cleanup, and shared helper/unit-test cleanup.
  4. On the new head, post one accept.sh result for MMStar, MMMU-Pro, and distinct, plus an ATOMesh log sample containing the routing fields parsed by distinct.py.

Once those changes and results are available, please ask Lingpeng to re-review. I will not approve the current head.

@valar-cop valar-cop 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.

some changes needed..

ci Run non-GPU unit tests (Pre Checkin) failed — not sure yet (low): The provided job log is empty (0 bytes), so the failing assertion is not visible. This PR adds only shell/python files under tests/accept/ that pytest's tests/ collection does not pick up, so it cannot reach the CPU suite; the head also carries the stack merges, so the failure cannot be attributed from this log.

.valar/ci/job_137250537679.log is 0 bytes — no log content to inspect
next: Re-run or attach the job log; if it is test_mxfp4_apply_hands_the_shared_output_to_fused_experts as the description says, confirm the same failure on main before attributing it here. https://github.com/ROCm/ATOM/actions/runs/45036247692/job/137250537679


# Shared storage every node mounts at the same path: the cache (lmms-eval
# source, the ATOMesh build), the results directory and the HF cache.
ACCEPT_DIR=${ACCEPT_DIR:-/share_nfs/junyan_tmp_r120/accept}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

nothing runs this harness, and these defaults are personal host paths.. extend the existing mmstar/atomesh ci instead?

own fields (not its span's)."""
events = []
for line in log.splitlines():
_, mark, fields = ANSI.sub("", line).partition("routing decision")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

no routing decision event and no key_hash at this head, so this can never pass.. land #3407 first and post one distinct run


def main():
task = "mmstar_notoken"
ref = reference() if env("REF_TOPOLOGY") else None

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

with no reference a 0% direct run passes and becomes the reference.. add an absolute threshold like atom_mmstar_ci.sh

"score": score,
"stderr": stderr(score, n),
"n": n,
"failed_requests": failed_requests(samples[task]),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

failed_requests never appended to failures, and tolerance from the run under test not the reference.. also REF_TOPOLOGY never read?

Comment thread tests/accept/atomesh_mm/lib.sh Outdated
echo "${!name:-}"
}

cname() { echo "epd-${ACCEPT_ISSUE}-$1"; }

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

cname has no PORT_BASE so two runs collide, and the loser removes the winner's container.. add run id and append after docker run succeeds

import shutil
from pathlib import Path

from mmstar import env, failed_requests, finish, run_check, run_lmms_eval, stderr

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

check module used as a library.. move helpers to _common.py and add cpu tests for the pure ones

The distinct check looked for a `routing decision` event with a
`key_hash` field, which neither #3407 nor main emits, so A3 could not
pass. It now reads the existing `mesh::route` "Selected worker" event:
one per request with `media_count=1`, and a blue `match_ratio` below 1.
A media request routes on cache_aware's prefix tree, which by then holds
the red request's key, so an equal key would match whole.

`checks/distinct.env` turns the route log on (`--route-log-sample-rate
1`) through a new `MESH_ARGS` hook in `launch_mesh`; the unused
`policy_apply=debug` RUST_LOG filter is dropped.

The M3.1 profile's default image moves to nightly_202611211511: the
branch needs aiter's `fused_mixed_sample` (#2914), which older nightlies
lack.

Checked on pit2-p03-g15: `accept.sh m31 single distinct` PASS
(red match_ratio 0.0, blue 0.073, both media_count 1).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@valar-cop valar-cop 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.

some changes needed..

ci green.


# Shared storage every node mounts at the same path: the cache (lmms-eval
# source, the ATOMesh build), the results directory and the HF cache.
ACCEPT_DIR=${ACCEPT_DIR:-/share_nfs/junyan_tmp_r120/accept}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

nothing in .github runs this yet, and these are personal nfs paths and hosts.. wire it into the existing ci path or make them required inputs


def main():
task = "mmstar_notoken"
ref = reference() if env("REF_TOPOLOGY") else None

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

no absolute floor on direct, so a 0% run passes and becomes the reference.. need a per-model threshold like atom_mmstar_ci.sh

"score": score,
"stderr": stderr(score, n),
"n": n,
"failed_requests": failed_requests(samples[task]),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

failed_requests never added to failures, tolerance uses the run under test, and ref always reads the recipe ignoring REF_TOPOLOGY.. please fix all three

Comment thread tests/accept/atomesh_mm/lib.sh Outdated
echo "${!name:-}"
}

cname() { echo "epd-${ACCEPT_ISSUE}-$1"; }

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

cname ignores PORT_BASE and CONTAINERS is appended before docker run, so a second run can rm -f the first one's container..

junyyang-amd added a commit that referenced this pull request Nov 23, 2026
Addresses the review of #3417:
- Each decision names the PR of the stack that implements it (#3410,
  #3407, #3411-#3413, #3408, #3409, #3414-#3416); the Acceptance table
  names the PR that adds each check.
- No reference outside ROCm/ATOM remains: the requirement, the
  measurements and the rules decisions rest on are stated in place.
- D4/D5 follow #3410: decode clears `is_multimodal` when P kept the
  media; only the non-streaming single branch returns `cache_seed`.
- D6 names the scheduler's actual refusal of a media-less local prefill.
- D3 and A3 describe the route-log `match_ratio` check.
- D11 says why matched rails do not apply; D12 states E's word handling
  as implemented, the 503 on a full pool, and the open gap: P's TP ranks
  do not agree on a read of E's embeddings. D13 notes
  `image_grid_thw` is dropped with the pixels once leased.
- Harness facts follow #3416's defaults (g07, g08, g24 and HCA maps).
- The CLAUDE.md row marks the guide as the design of its PR stack.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er names, shared helpers

Addresses review items 2-6 on #3414:

- distinct reads ATOMesh's route log, so accept.sh refuses it on a
  topology that starts no ATOMesh (direct) before starting anything; its
  docstring names the #3407 dependency.
- MMStar fails below the profile's MMSTAR_THRESHOLD on every topology
  (M3.1: 0.68), so a broken direct run no longer passes and becomes the
  reference; an unset threshold fails the check. A LIMIT run, never
  recorded as a reference, skips the floor.
- MMMU-Pro fails on failed requests, compares single against direct's
  recorded run when REF_TOPOLOGY is set (the recipe only on direct), and
  takes its tolerance from the reference's standard error.
- Containers are named epd-<ACCEPT_ISSUE>-<PORT_BASE>-<role> and enter the
  cleanup list only after docker run succeeds, so a run that loses a name
  clash no longer removes the other run's container.
- The lmms-eval helpers move from checks/mmstar.py to checks/_common.py;
  tests/test_accept_atomesh_mm.py covers the pure helpers and each of the
  above on CPU.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
junyyang-amd added a commit that referenced this pull request Nov 23, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@junyyang-amd
junyyang-amd removed this pull request from stack #3699 November 23, 2026 07:14
@junyyang-amd

Copy link
Copy Markdown
Contributor Author

Closing per review: the harness is not wired into CI and its defaults are one person's hosts and paths, so it stays out of the tree.

junyyang-amd added a commit that referenced this pull request Nov 23, 2026
…hey check

With #3414 and #3416 closed, the Acceptance table names the PR each result is posted on (#3407, #3410, #3415) instead of harness files; D8, D17, D18 and D20 describe acceptance topologies and the out-of-tree harness; D19 follows #3415's current cell; the per-PR table drops #3414 and #3416.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

4 participants