Repository navigation
docs(skills): add testing rules, drop the tests they forbid - #5009
Conversation
Signed-off-by: Yuki Huang <[email protected]>
45b0d74 to
58cdf2d
Compare
yuki-97
left a comment
There was a problem hiding this comment.
Self-review via /review-pr-team: 4 agents (rl-expert, test-agent, bug-finder, design-reviewer) + devil's-advocate pass.
Verdict — 6 inline comments. C1 is blocking: the async_rl routing sends two legacy VLM recipes to SingleController validation, which fails, so L0 Other goes red. The rest are small: an assertion that always passes (C2), a stale comment (C3), a zero-KL coverage gap (C4), a value read-back the new pydantic rule forbids (C5), and a PR-body note on the removed DeepEP allowlist (C7).
Verified clean
- Deleted tests: each of the ~110 removed tests is a default pin, a rejection pydantic already enforces, a recipe or script pin, or a load-only check now covered by
test_all_config_files_have_required_keys; C4 is the only real coverage loss. No deleted file or test name is still referenced in the L0 scripts,excluded_unit_tests.sh, workflows or docs. - The new central guards pass on the current tree (CPU run): local paths (739 files), W&B entity (416), HybridEP 64 × CP (28 recipes),
nccl_reshardrefit (8), FA2 pin (8 exemplar sections). The local-path and W&B guards cover more than the deleted experiments-only checks. - Validating the real SingleController configs against
SingleControllerMasterConfigdrops no schema check, andcheck_nccl_reshard_refit_support(SimpleNamespace(policy=...))matches what that function reads (master_config.policy.get(...)). tests/unit/test_config_validation.pyis the right home for these guards: it already held the config-wide ones, and thenccl_reshardand SingleController checks call the production validators instead of copying them.
Generated by Claude Code
|
/ok to test 1eba047 |
terrykong
left a comment
There was a problem hiding this comment.
Thanks for this cleanup. Moving the guards that matter into config-wide tests in test_config_validation.py means a new recipe is covered without writing a new test. The fixes from your self-review check out at 1eba047 (C1 routing, C2, C3, C5), and CI is green on this head.
Two coverage gaps to fix before approval. Both are setup-time validators of ours, and the deleted tests were their only PR-time run:
- (C8) The zero-KL check, as a reply on your C4 thread: the new test runs only
validate_batch_invariant_mode, notvalidate_zero_train_gen_mismatch. - (C9) The full-vocab MOPD loss check, which SingleController setup runs only after the GPUs are up.
Lower priority:
3. (C11) Rule 4 wording, plus three leftover tests it covers.
Optional: the follow-up in #4427 still says to remove the recipes' exception from the PR #4037 config guard. That guard is gone, so a one-line note on #4427 would keep it accurate.
Comment IDs start at C8 because your self-review already used C1–C7 on this PR.
Generated by Claude Code
Signed-off-by: Yuki Huang <[email protected]>
Signed-off-by: Yuki Huang <[email protected]>
…2 guard Signed-off-by: Yuki Huang <[email protected]>
Signed-off-by: Yuki Huang <[email protected]>
Signed-off-by: Yuki Huang <[email protected]>
Signed-off-by: Yuki Huang <[email protected]>
Signed-off-by: Yuki Huang <[email protected]>
Signed-off-by: Yuki Huang <[email protected]>
…g ones Signed-off-by: Yuki Huang <[email protected]>
Signed-off-by: Yuki Huang <[email protected]>
…g ones Signed-off-by: Yuki Huang <[email protected]>
Signed-off-by: Yuki Huang <[email protected]>
…trally Signed-off-by: Yuki Huang <[email protected]>
Signed-off-by: Yuki Huang <[email protected]>
Signed-off-by: Yuki Huang <[email protected]>
Signed-off-by: Yuki Huang <[email protected]>
Signed-off-by: Yuki Huang <[email protected]>
Signed-off-by: Yuki Huang <[email protected]>
1eba047 to
ec0d292
Compare
Signed-off-by: Yuki Huang <[email protected]>
Signed-off-by: Yuki Huang <[email protected]>
|
/ok to test 5f20365 |
|
Besides rebasing and addressing review comments:
|
Merge origin/main (49 commits) to clear the conflicts with NVIDIA-NeMo#5009 and the "Check if PR branch is up to date" gate. Code main moved into rollout_checkpointing/ and main's new tests get the same attribute access as the rest of this PR. Review fixes: - load_replay_buffer is a plain bool defaulting to True; readers test `not load_replay_buffer`, and the reference configs dump `true`. - save_period defaults to 10; note that higher_is_better is only read when metric_name is set. - PretrainedCheckpointConfig stays a TypedDict until PolicyConfig migrates (NVIDIA-NeMo#3197), so setup hands it over unchanged and PolicyConfig.pretrained_checkpoint keeps its TypedDict annotation. - Indent the CheckpointingConfig docstring under Attributes: and document save_period, checkpoint_must_save_by and pretrained_checkpoint. - Tests build CheckpointingConfig with keyword arguments. - Drop the defaults-only CheckpointManager test (NVIDIA-NeMo#5009 testing rules). Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Shubhankar Tripathy <[email protected]>
…kind-advantages Brings in main 939890a (94 commits). Conflicts, all keeping both sides: - rollout_recovery.py: main's ledger is at schema 8 (6: turn-level recovery, 7: taskset attribution, 8: steps_allowed_short), so the sealed failure_kind moves from 6 to 9; schemas 2 to 8 still load, with failure_kind=None. The failure_kind check sits next to main's attribution_key check. - rollout_manager.py: main's imports plus Collection; main's mask_sample_flagged() next to the failure_kind read. - docs/guides/grpo.md: main unwrapped the guide's sentences (#5211); the exclude_infra text follows that style. - test_grpo.py: main removed the masked_reward_policy default test under its testing rules (#5009); the exclude_infra behaviour tests stay. - test_rollouts.py, test_single_controller_actor.py, test_rollout_reassembler_actor.py: both sides' tests and fields. - test_rollout_manager.py: generate_for_finalization now returns (request, rollout_metrics). Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Yi-Fu Wu <[email protected]>
What does this PR do ?
Adds four rules to the testing skill against unit tests that only restate a config or pydantic, and deletes the existing ones. Tests and docs only; no runtime code change. Once #4998 merges, these rules move with the testing skill into the contributing skill.
What changed
1. Add four unit-test rules to
skills/testing/SKILL.md.test_all_config_no_tp_size_accuracy_issues, is still fine.test_config_validation.pyalready does that for every config, now includingvalidate_single_controller_configon SingleController configs.Literal, type and required-field rejection.2. Delete the tests these rules forbid. Whole files removed:
tests/unit/test_recipe_settings.pytests/unit/test_video_grpo_recipes.pytests/unit/tools/test_hybridep_default_8g_recipes.pytests/unit/models/generation/test_vllm_qwen35_bf16_trtllm_recipe.pytests/unit/models/generation/test_vllm_qwen35_mxfp8_recipe.pytests/unit/models/generation/test_swe1_dynamo_config.pytests/unit/single_controller/test_cc_functional_recipe.pytests/unit/data/test_sft_config.pytests/test_mxfp8_rollout_recipes.pyPer-recipe validate tests and default or pydantic tests across the suite are removed as well (#4037 lists several). Where a deleted test guarded a real invariant,
test_config_validation.pynow checks it for every config:check_nccl_reshard_refit_supporton everynccl_reshardrecipevalidate_batch_invariant_modeon everybatch_invariant_moderecipeThe HybridEP check no longer requires AutoModel EP recipes to pick
hybrideportorch, so theDEEPEP_FALLBACK_RECIPESallowlist tracked in #4427 is gone; the dispatcher is a recipe performance choice.🤖 Generated with Claude Code