Skip to content

feat(ci): add SUITE/TAGS/SKU declarations and tools/list-suites - #3560

Open
terrykong wants to merge 3 commits into
test-suite-hero-run-pointersfrom
test-suite-declarations
Open

terrykong wants to merge 3 commits into
test-suite-hero-run-pointersfrom
test-suite-declarations

Conversation

@terrykong

@terrykong terrykong commented Aug 9, 2026 •

Copy link
Copy Markdown
Collaborator

@kajalj22 — this needs a matching nemo-ci change

TL;DR: tests/test_suites/<suite>.txt is being replaced by tools/list-suites <suite>, which prints the same thing. Nothing breaks when this PR merges — the .txt files stay. A later PR deletes them, and that one can only land after nemo-ci switches.

The change, in nemo_rl/generate_rl_dynamic.sh:

-LIST_PATH="tests/test_suites/${SUITE}.txt"
-LIST_FILE="$TEMP_ROOT/$LIST_PATH"
-if [[ ! -f "$LIST_FILE" ]]; then
-  echo "List file not found: $LIST_FILE" >&2
-  exit 1
-fi
+LIST_FILE="$(mktemp)"
+if ! "$TEMP_ROOT/tools/list-suites" "$SUITE" >"$LIST_FILE"; then
+  echo "tools/list-suites failed for suite: $SUITE" >&2
+  exit 1
+fi

Everything downstream is unchanged — the while IFS= read -r raw_line loop, the comment stripping, the tests/test_suites/ prefix normalisation, extract_config, all of it.

What you can rely on:

Output one repo-relative path per line, sorted, nothing else — no comments or blanks, so the existing stripping is harmless
Suite names all nine you use today: nightly, nightly_gb200, nightly_mcore, nightly_mcore_gb200, release, release_gb200, performance, performance_gb200, disabled
Dependencies none — bash + awk only. It runs before any venv exists, so a broken uv sync cannot make a suite look empty
Unknown suite exits 2 with the valid names on stderr (today a missing file exits 1)
Location tools/list-suites in the RL clone, mode 755
Discovery tools/list-suites --suites lists every valid name; --gpu-hours <suite> prints per-test and total cost

Verified: tools/list-suites reproduces all nine manifests exactly — same 231 scripts, same paths. So the generated child pipeline is byte-identical before and after your switch.

There is no rush: this PR and yours are independent, and the manifests only disappear in a follow-up that waits on you.


What does this PR do ?

Moves suite membership out of nine .txt files and into each test driver's CONFIG block.

Stack position: PR 3a of 5. Below: #3559. Above: PR 3b (delete the manifests — blocked on the nemo-ci change above), PR 4 (naming validator), PR 5 (testing skill).

The declarations

# ===== BEGIN CONFIG =====
SUITE=nightly            # nightly | release | performance | disabled
TAGS="mcore"             # optional; labels a slice of the suite
SKU=h100                 # h100 | gb200
NUM_NODES=1
...

DISABLED_REASON="..." is required whenever SUITE=disabled.

Why the driver. Which suite a test belongs to is decided once, when the test is written, by the person who knows what it costs. Keeping that next to the thing it describes beats keeping it in one of nine files elsewhere. And the CONFIG block is already the cross-repo interface for per-test metadata — tools/launch, nemo-ci's generator and the unit tests all parse it — so this extends a mechanism rather than inventing one.

Why TAGS is separate from SUITE. nightly_mcore is the only overlap in the whole system: a curated slice of nightly, consumed today by two different dependency-bump triggers. Cadence ("how often does this run") and slice ("which subset am I selecting") are different questions, so a test says SUITE=nightly and TAGS="mcore" rather than a multi-valued suite that would also permit meaningless combinations like nightly release. TAGS deliberately says nothing about why a slice exists — the Megatron bump is simply the first thing we slice for.

Why SKU rather than deriving from GPUS_PER_NODE. The lane is a hardware SKU; the GPU count is a consequence. Deriving it would re-encode the same fact in two places — the class of bug that produced recipes named 2n8g that run on one node. It's declared once and cross-checked instead.

tools/list-suites

tools/list-suites nightly              # one repo-relative path per line
tools/list-suites --gpu-hours release  # per-test and total, matching tools/launch exactly
tools/list-suites --suites             # every valid suite name

Plain bash, no dependencies, for the reason in the box above.

Tests

  • test_declarations_reproduce_the_manifest — parametrised over all nine suites; this is what prevents drift while both sources of truth exist, and it retires with the manifests.
  • test_every_driver_declares_a_valid_suite_and_sku — rejects an unknown SUITE/SKU, requires a reason on anything disabled.
  • test_declared_sku_matches_gpus_per_node — declared SKU vs GPUs actually requested from Slurm.

test_nightly_suites_match_gpus_per_node is removed: it only covered the two nightly lanes and is subsumed by the last two above, which cover all 231 drivers.

Also

Normalises a whitespace-only line in release.txt, and separates the header comment in disabled.txt from the first entry's reason so each entry's rationale is attributable to it alone.

Verified locally

  • tools/list-suites reproduces all nine manifests exactly (231 drivers)
  • --gpu-hours totals match tools/launch per lane (nightly 3282, release 6394, nightly_gb200 321)
  • all 231 drivers still pass TEST_DRYRUN with the declarations present — they're live bash inside the CONFIG block, so this confirms nothing in them breaks a driver

Before your PR is "Ready for review"

Pre checks:

  • Make sure you read and followed Contributor guidelines
  • Did you write any new necessary tests? — three, listed above.
  • Did you run the unit tests and functional tests locally? — partially. TEST_DRYRUN ran in full (231/231) and the three new tests were replicated against the same files. The pytest module itself needs CI: the uv workspace will not build without the 3rdparty/* submodules, and tools/launch cannot run on macOS (its extract_config uses GNU sed \+ — note tools/list-suites deliberately avoids that and works under both BSD and GNU).
  • Did you add or update any necessary documentation? — tools/list-suites documents its own usage; tests/test_suites/README.md is updated in PR 3b when the manifests actually go away.

@terrykong
terrykong requested review from a team as code owners August 9, 2026 22:19
@copy-pr-bot

copy-pr-bot Bot commented Aug 9, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@terrykong
terrykong requested a review from kajalj22 August 9, 2026 22:19
@terrykong
terrykong requested a review from a team as a code owner August 9, 2026 23:57
@terrykong
terrykong force-pushed the test-suite-declarations branch from 07935b6 to 435c211 Compare August 9, 2026 23:57
@terrykong terrykong changed the title feat(ci): declare suite membership in each test driver feat(ci): add SUITE/TAGS/SKU declarations and tools/list-suites Aug 10, 2026
PR 3a of the test-suite overhaul. Below it: the recipe restructure. Above it:
PR 3b, which deletes the .txt manifests once nemo-ci reads the declarations
instead.

Each driver's CONFIG block now says which suite it belongs to, which SKU it
targets, and which dependency-bump gates it guards:

  SUITE=nightly            # nightly | release | performance | disabled
  GATES="mcore"            # optional, only where the driver gates a bump
  SKU=h100                 # h100 | gb200
  DISABLED_REASON="..."    # required when SUITE=disabled

The decision about which suite a test belongs to is made once, when the test is
written, by the person who knows what it costs. Putting it in the driver keeps
that decision next to the thing it describes, instead of in one of nine files
somewhere else. The CONFIG block is already the cross-repo interface for
per-test metadata -- tools/launch, nemo-ci's generator and the unit tests all
parse it -- so this extends an existing mechanism rather than adding one.

tools/list-suites reads those declarations and prints the scripts in a suite,
one repo-relative path per line: a drop-in replacement for reading
tests/test_suites/<suite>.txt. It is plain bash with no dependencies, because it
is called to build a job list before any Python environment exists and a failed
`uv sync` must not be able to make a suite look empty. --gpu-hours reports
per-test and total cost using the same integer arithmetic as tools/launch, so
the numbers agree exactly.

The manifests remain authoritative in this change. Nothing is deleted and no
suite's contents move, so this is safe to land before nemo-ci is migrated.
test_declarations_reproduce_the_manifest asserts the two agree for all nine
suites, which is what stops them drifting apart in the meantime; it retires
along with the manifests.

Two further tests replace one that was narrower:
test_every_driver_declares_a_valid_suite_and_sku rejects an unknown SUITE or
SKU and requires a reason on anything disabled, and
test_declared_sku_matches_gpus_per_node checks the declared SKU against the
GPUs actually requested from Slurm. The latter subsumes
test_nightly_suites_match_gpus_per_node, which only covered the two nightly
lanes, so that test is removed.

Also normalises a whitespace-only line in release.txt, and separates the header
comment in disabled.txt from the first entry's reason so that each entry's
rationale is attributable to it alone.

Verified locally: tools/list-suites reproduces all nine manifests exactly
(231 drivers); its --gpu-hours totals match tools/launch for every lane; all
231 drivers still pass TEST_DRYRUN with the declarations present.

Signed-off-by: Terry Kong <[email protected]>
GATES named the only thing the field is used for today -- selecting the subset
of nightly that guards a Megatron or Megatron-Bridge bump -- rather than the
mechanism, which is an arbitrary label selecting a slice of a suite. The next
slice we want may have nothing to do with gating a dependency bump.

TAGS is the conventional word for that, it reads correctly when multi-valued
(TAGS="mcore fp8", where SUBSUITE="mcore fp8" would not), and it says nothing
about why a slice exists.

No behaviour change: tools/list-suites still resolves nightly_mcore to
SUITE=nightly plus the mcore tag, and all nine suites still reproduce their
manifests exactly.

Signed-off-by: Terry Kong <[email protected]>
Folding the manifest comments into DISABLED_REASON dropped the part that
mattered. The Qwen3.5 geo3k reason was cut mid-sentence at "which...",
losing the finding that the hang is not vLLM-version specific but the
pre-existing Qwen3.5 + Megatron + EP hang. The circle_click reason kept the
description and dropped both actual reasons: the recipe has never run end to
end, so its reward threshold is unvalidated.

A DISABLED_REASON that says what a test is rather than why it is off gives
the next reader nothing to act on.

Signed-off-by: Terry Kong <[email protected]>
@terrykong
terrykong force-pushed the test-suite-declarations branch from 435c211 to aea2ee1 Compare August 11, 2026 16:19
@terrykong terrykong added the CI:Lfast Runs a fast test suite and re-use nightly `main` container (but sync dependencies to PRs version) label Nov 5, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI:Lfast Runs a fast test suite and re-use nightly `main` container (but sync dependencies to PRs version)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant