-
Notifications
You must be signed in to change notification settings - Fork 169
fix: update tests_eagle.py; disable eval for offline #358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
Warning Rate limit exceeded@h-guo18 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 25 minutes and 43 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (3)
WalkthroughAppends Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
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 |
Does |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
tests/examples/speculative_decoding/test_eagle.py (1)
47-47
: Cast tmp_path to str for output_dir to avoid type issues.Align with how config_file is handled and prevent potential arg serialization issues.
Apply:
- "--output_dir", tmp_path / "eagle-tinyllama", + "--output_dir", str(tmp_path / "eagle-tinyllama"),examples/speculative_decoding/launch_train.sh (1)
132-132
: Quote OFFLINE_DATA_PATH to handle spaces safely.Prevents word-splitting if the path contains spaces.
Apply:
- OFFLINE_TRAINING_ARGS="--offline-data-path $OFFLINE_DATA_PATH --ar_validate_steps -1" + OFFLINE_TRAINING_ARGS="--offline-data-path \"$OFFLINE_DATA_PATH\" --ar_validate_steps -1"(Optional follow-up) Consider quoting other path-like vars in CMD (MODEL, OUTPUT_DIR, DATA).
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
examples/speculative_decoding/launch_train.sh
(1 hunks)tests/examples/speculative_decoding/test_eagle.py
(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: benchislett
PR: NVIDIA/TensorRT-Model-Optimizer#300
File: examples/speculative_decoding/main.py:150-159
Timestamp: 2025-09-17T14:14:44.961Z
Learning: In examples/speculative_decoding/main.py, setting num_hidden_layers=0 for offline training has been successfully tested by benchislett with past models and works in their use case for EAGLE3 offline training.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: linux
- GitHub Check: build-docs
- GitHub Check: code-quality
🔇 Additional comments (2)
examples/speculative_decoding/launch_train.sh (1)
127-134
: Approve — disabling AR validation for offline training is supportedexamples/speculative_decoding/main.py declares ar_validate_steps, ARValidationCallback returns early when ar_validate_steps <= 0, and the trainer is constructed with ARValidationCallback(training_args.ar_validate_steps); offline_data_path toggles offline mode. Using --ar_validate_steps -1 is valid.
tests/examples/speculative_decoding/test_eagle.py (1)
37-41
: Approved — ./launch_train.sh path and executable verifiedrun_example_command sets cwd to MODELOPT_ROOT / "examples" / example_path, and examples/speculative_decoding/launch_train.sh exists with git mode 100755 (executable).
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #358 +/- ##
==========================================
- Coverage 73.46% 73.46% -0.01%
==========================================
Files 172 172
Lines 17640 17640
==========================================
- Hits 12960 12959 -1
- Misses 4680 4681 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: h-guo18 <[email protected]>
Signed-off-by: h-guo18 <[email protected]>
c1f38e3
to
98c4de4
Compare
Signed-off-by: h-guo18 <[email protected]> Signed-off-by: Ye Yu <[email protected]>
What does this PR do?
Type of change: Bug fix
Overview:
This PR fix two minor bugs of speculative decoding:
tests/examples/speculative_decoding
after PR 300;Usage
# Add a code snippet demonstrating how to use this
Testing
pytest -s tests/examples/speculative_decoding
Before your PR is "Ready for review"
Additional Information
Summary by CodeRabbit
New Features
Tests