Skip to content

test: add a recipe-name validator and rename 13 mismatched recipes - #3561

Open
terrykong wants to merge 1 commit into
test-suite-declarationsfrom
test-suite-naming
Open

terrykong wants to merge 1 commit into
test-suite-declarationsfrom
test-suite-naming

Conversation

@terrykong

Copy link
Copy Markdown
Collaborator

What does this PR do ?

Makes every recipe name true, and adds a test that keeps it that way.

Stack position: PR 4 of 5. Below: #3560 (SUITE/TAGS declarations). Above: PR 5 (testing skill).

A recipe's filename is the only place that records what it covers. Nothing else says a test exists to exercise sequence packing, or that two tests are a deliberate pair differing by one knob. That only works if the name can't drift from the config — so this renames the 13 recipes whose names were wrong and adds a validator.

Renamed — backend token missing or in the wrong slot

Before After
grpo-llama3.1-8b-instruct-2n8g-**async**-1off-single-controller-streaming2 …-2n8g-**megatron**-async-1off-…
sft-llama3.1-70b-8n4g-**tp2pp2-long-megatron** sft-llama3.1-70b-8n4g-**megatrontp2pp2**-long
sft-llama3.1-70b-8n8g-**tp4pp2-long-megatron** sft-llama3.1-70b-8n8g-**megatrontp4pp2**-long
grpo-**moonlight-16b-automodel-1n8g**-ep8 grpo-moonlight-16b-**1n8g-automodel**-ep8
gdpo-qwen2.5-1.5b-1n8g-**gym**-multireward …-1n8g-**fsdp2tp1**-gym-multireward
grpo-qwen3-8b-base-1n8g-**fp8-kvcache-megatron** …-1n8g-**megatrontp4**-fp8-kvcache
grpo-qwen3-8b-base-dapo-2n8g-**long-megatron**-qa-nvfp4-w4a16 …-2n8g-**megatrontp4**-long-qa-nvfp4-w4a16

Renamed — no cluster tuple at all

The two release recipes are where this mattered most: nothing in the name said how big they were.

Before After Actual
grpo-dapomath17k-dsv3-megatron …-dsv3-**32n8g**-megatron 32 nodes, 1024 GPU-h
dapo-qwen2.5-7b.v2 dapo-qwen2.5-7b-**16n8g-fsdp2cp4**.v2 16 nodes
grpo-math-qwen3-30ba3b-megatron-tp4-32k …-30ba3b-**4n8g-megatrontp4**-32k 4 nodes

The dapo rename also makes the pair consistent — its GB200 twin was already named dapo-qwen2.5-7b-16n4g-fsdp2cp2.v2.

Renamed — the name claimed two nodes, the driver said one

{grpo,sft}-nanov3-30BA3B-**2n8g**-fsdp2[-tq_mooncake] → 1n8g. Driver and config agree on 1; only the name disagreed.

Not renamed

sft-llama3.2-1b-2n8g-**hsdp** — HSDP is a real DTensor sharding strategy. The name was right; my vocabulary was incomplete.

Config fix

vlm_grpo-qwen2.5-omni-3b-avqa-1n8g-megatron.v1 inherited cluster.gpus_per_node: 2 from its base config while its driver allocated a whole 8-GPU node — six GPUs idle for the run, and the 1n8g in the name false. Set to 8.

The validator

tests/unit/test_recipe_naming.py checks the mandated sections — algorithm, model, cluster tuple, backend — both ways, and feature tokens one way only.

That asymmetry is the important part. 94 recipes enable sequence packing and only a handful say seqpack, because the token means "this test exists to cover packing", not "packing is on". Enforcing it both ways would have demanded 94 renames and destroyed exactly the signal the name is carrying. So: a name that claims a feature must have it; a config may use a feature without advertising it.

performance/ and reproduce/ are exempt by directory, not by allowlist — perf recipes are named for the shape being benchmarked and their hyperparameters are frozen, and reproduce/ recipes encode what the reproduction varies (the DeepScaleR chain puts context length where the cluster tuple would go).

Verified locally

  • 185 recipes checked: 0 parse failures, 0 name/config disagreements
  • 231/231 drivers pass TEST_DRYRUN
  • All nine suites still reproduce their manifests; all GPU-hour budgets unchanged
  • Every defaults: edge under examples/ resolves

One thing worth flagging for review: the renames are applied by exact stem, because two old names are strict prefixes of recipes that were not renamed (grpo-nanov3-30BA3B-2n8g-fsdp2 vs …-fsdp2-lora, which really does run on two nodes). A naive substring replacement silently rewrites the LoRA variants.

Before your PR is "Ready for review"

Pre checks:

  • Make sure you read and followed Contributor guidelines
  • Did you write any new necessary tests? — tests/unit/test_recipe_naming.py.
  • Did you run the unit tests and functional tests locally? — partially. The new module's checks were executed over all 185 in-scope recipes, and TEST_DRYRUN over all 231 drivers. The pytest run itself needs CI: the uv workspace will not build without the 3rdparty/* submodules.
  • Did you add or update any necessary documentation? — the naming grammar is documented in the test module's docstring; tests/test_suites/README.md and the testing skill get the prose version in PR 5.

@terrykong
terrykong requested review from a team as code owners August 9, 2026 22:53
@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.

@github-actions github-actions Bot added the Documentation Improvements or additions to documentation label Aug 9, 2026
@terrykong
terrykong requested a review from a team as a code owner August 9, 2026 23:57
@terrykong terrykong changed the title test: make recipe names match their configs, and check that they do test: add a recipe-name validator and rename 13 mismatched recipes Aug 10, 2026
PR 4 of 5 in the test-suite overhaul. Below it: the SUITE=/TAGS= declarations.
Above it: the testing skill.

A recipe's filename is the only place that records what it covers. Nothing else
says a test exists to exercise sequence packing, or that two tests are a
deliberate pair differing by one knob. That only works if the name cannot drift
from the config, so this renames the recipes whose names were wrong and adds a
test that keeps them honest.

Renamed, backend token missing or in the wrong slot:

  grpo-llama3.1-8b-instruct-2n8g-async-1off-single-controller-streaming2
    -> ...-2n8g-megatron-async-1off-single-controller-streaming2
  sft-llama3.1-70b-8n{4,8}g-tp{2,4}pp2-long-megatron
    -> sft-llama3.1-70b-8n{4,8}g-megatrontp{2,4}pp2-long
  grpo-moonlight-16b-automodel-1n8g-ep8   (backend before the cluster tuple)
    -> grpo-moonlight-16b-1n8g-automodel-ep8
  gdpo-qwen2.5-1.5b-1n8g-gym-multireward
    -> gdpo-qwen2.5-1.5b-1n8g-fsdp2tp1-gym-multireward
  grpo-qwen3-8b-base-1n8g-fp8-kvcache-megatron
    -> grpo-qwen3-8b-base-1n8g-megatrontp4-fp8-kvcache
  grpo-qwen3-8b-base-dapo-2n8g-long-megatron-qa-nvfp4-w4a16
    -> grpo-qwen3-8b-base-dapo-2n8g-megatrontp4-long-qa-nvfp4-w4a16

Renamed, no cluster tuple at all -- the two release recipes are the ones where
that mattered most, at 32 and 16 nodes:

  grpo-dapomath17k-dsv3-megatron        -> ...-dsv3-32n8g-megatron
  dapo-qwen2.5-7b.v2                    -> dapo-qwen2.5-7b-16n8g-fsdp2cp4.v2
  grpo-math-qwen3-30ba3b-megatron-tp4-32k -> ...-30ba3b-4n8g-megatrontp4-32k

The dapo rename also makes the pair consistent: its GB200 twin was already
named dapo-qwen2.5-7b-16n4g-fsdp2cp2.v2.

Renamed, the name claimed two nodes but the driver and config both said one:

  {grpo,sft}-nanov3-30BA3B-2n8g-fsdp2[-tq_mooncake] -> ...-1n8g-...

Not renamed: sft-llama3.2-1b-2n8g-hsdp. HSDP is a real DTensor sharding
strategy, so the name was right and the vocabulary was incomplete.

vlm_grpo-qwen2.5-omni-3b-avqa-1n8g-megatron.v1 inherited cluster.gpus_per_node
2 from its base config while its driver allocated a whole 8-GPU node, so six
GPUs sat idle for the run and the 1n8g in the name was false. Set to 8.

tests/unit/test_recipe_naming.py checks the mandated sections -- algorithm,
model, cluster tuple, backend -- in both directions, and feature tokens in one
direction only: a name that claims a feature must have it, but a config may use
one without advertising it. That asymmetry is deliberate. 94 recipes enable
sequence packing and only a handful say seqpack, because the token means "this
test exists to cover packing", not "packing is on". Enforcing it both ways
would have demanded 94 renames and destroyed the signal.

performance/ and reproduce/ are exempt by directory. Performance recipes are
named for the shape being benchmarked and their hyperparameters are frozen;
reproduce/ recipes encode what the reproduction varies, which is why the
DeepScaleR chain puts context length where the cluster tuple would go.

The renames are applied by exact stem, not by substring: two of the old names
are strict prefixes of recipes that were not renamed
(grpo-nanov3-30BA3B-2n8g-fsdp2 vs ...-fsdp2-lora), and the LoRA variants really
do run on two nodes.

Signed-off-by: Terry Kong <[email protected]>
@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
@terrykong terrykong removed the Documentation Improvements or additions to documentation label Nov 28, 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