test: fix bug in deselection and make fast tests even faster#2038
test: fix bug in deselection and make fast tests even faster#2038
Conversation
Signed-off-by: Terry Kong <terryk@nvidia.com>
📝 WalkthroughWalkthroughThis PR modifies test infrastructure files to adjust test configurations and expand coverage. Changes include removing fast-mode flags from specific tests, reducing batch sizes and sequence lengths in distillation and GRPO configurations, updating unit test exclusion path references, and expanding excluded test variants for improved test suite management. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
tests/unit/excluded_unit_tests.sh (1)
24-253:⚠️ Potential issue | 🔴 CriticalFix prefix mismatch in
--deselectentries: changetests/unit/tounit/.All
--deselectentries use the incorrect prefixtests/unit/...but pytest is invoked from thetests/directory (which becomes the rootdir), expecting node IDs likeunit/.... This causes deselection to silently fail, allowing slow tests to run in FAST mode.The
--ignoreentries correctly use theunit/...prefix. Change all--deselectentries fromtests/unit/tounit/to match the pytest rootdir context.Example fix
--deselect=tests/unit/algorithms/test_grpo.py::test_calculate_rewards_multiple_tasksshould be:
--deselect=unit/algorithms/test_grpo.py::test_calculate_rewards_multiple_tasks🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@tests/unit/excluded_unit_tests.sh` around lines 24 - 253, The --deselect node IDs use the wrong prefix "tests/unit/"; update every --deselect entry to use "unit/" instead (e.g. change --deselect=tests/unit/algorithms/test_grpo.py::test_calculate_rewards_multiple_tasks to --deselect=unit/algorithms/test_grpo.py::test_calculate_rewards_multiple_tasks) so pytest rootdir-based node IDs match and deselection actually works; leave the existing --ignore entries as-is.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@tests/functional/L1_Functional_Tests_GPU.sh`:
- Line 39: This change moves tests out of FAST mode and the PR must include
concrete before-and-after wall-clock timings for FAST-suite runs; run the
FAST-suite target (the test invoked by run_test in
tests/functional/L1_Functional_Tests_GPU.sh and the analogous invocation near
line 61) under the original FAST configuration and the new configuration,
capture wall-clock durations using a reliable timer (e.g., /usr/bin/time -v or
bash time) for each run, and add those numbers plus exact commands, environment
variables, commit hashes, runner/CI machine details, and any relevant FAST-suite
flags into the PR description so the performance delta is auditable.
---
Outside diff comments:
In `@tests/unit/excluded_unit_tests.sh`:
- Around line 24-253: The --deselect node IDs use the wrong prefix
"tests/unit/"; update every --deselect entry to use "unit/" instead (e.g. change
--deselect=tests/unit/algorithms/test_grpo.py::test_calculate_rewards_multiple_tasks
to
--deselect=unit/algorithms/test_grpo.py::test_calculate_rewards_multiple_tasks)
so pytest rootdir-based node IDs match and deselection actually works; leave the
existing --ignore entries as-is.
ℹ️ Review info
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
tests/functional/L1_Functional_Tests_GPU.shtests/functional/distillation.shtests/functional/grpo_megatron_async.shtests/unit/excluded_unit_tests.sh
yuki-97
left a comment
There was a problem hiding this comment.
cool! faster so much. thanks @terrykong !
Signed-off-by: Terry Kong <terryk@nvidia.com>
Signed-off-by: Terry Kong <terryk@nvidia.com>
Signed-off-by: Terry Kong <terryk@nvidia.com>
What does this PR do ?
Add a one line overview of what this PR aims to accomplish.
Issues
List issues that this PR closes (syntax):
Usage
# Add a code snippet demonstrating how to use thisBefore your PR is "Ready for review"
Pre checks:
Additional Information
Summary by CodeRabbit