-
Notifications
You must be signed in to change notification settings - Fork 222
feat: Timer for the data sharding and job submission #1802
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
base: main
Are you sure you want to change the base?
feat: Timer for the data sharding and job submission #1802
Conversation
Signed-off-by: Guyue Huang <guyueh@nvidia.com>
Signed-off-by: Guyue Huang <guyueh@nvidia.com>
📝 WalkthroughWalkthroughThis pull request adds optional timing instrumentation to policy training and inference methods across multiple algorithms by introducing timer and timer_tag_prefix parameters to method signatures and wrapping key operations with timer context managers. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
nemo_rl/models/policy/interfaces.py (1)
54-112: Update all PolicyInterface implementers to accept**kwargsinget_logprobs,get_reference_policy_logprobs, andtrainmethods.The interface now accepts arbitrary keyword arguments in these three methods, but no concrete implementation does. This will cause
TypeErrorwhen these methods are called through the interface with any unexpected keyword arguments.Implementations to update:
Policy(lm_policy.py): Currently accepts explicittimerandtimer_tag_prefixparameters; add**kwargsor refactor to use kwargsMegatronPolicyWorker,DTensorPolicyWorker,DTensorPolicyWorkerV2: Add**kwargstoget_logprobsandtrainBasePolicyWorker: Add**kwargstoget_reference_policy_logprobs
|
@youngeunkwon0405 please review |
youngeunkwon0405
left a comment
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.
LGTM
What does this PR do ?
Wrap data sharding and job submission in timer to provide richer timing debugging info.
For example, for the newly added qwen30b 40K seqlen GRPO example, the timing info looks like this

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
✏️ Tip: You can customize this high-level summary in your review settings.