Misc: Remaining cherry-picks for 26.02.01#2631
Conversation
📝 WalkthroughWalkthroughAdds Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 2 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (2 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.
🧹 Nitpick comments (1)
scripts/performance/configs/qwen/qwen3_llm_pretrain.py (1)
81-81: Consider replacing repeated dispatcher string literals with module-level constants.This reduces typo risk and keeps future edits safer.
As per coding guidelines: "Use upper snake_case for constants".♻️ Suggested refactor
+MOE_TOKEN_DISPATCHER_FLEX = "flex" +MOE_TOKEN_DISPATCHER_ALLTOALL = "alltoall" ... - cfg.model.moe_token_dispatcher_type = "flex" + cfg.model.moe_token_dispatcher_type = MOE_TOKEN_DISPATCHER_FLEX ... - cfg.model.moe_token_dispatcher_type = "alltoall" + cfg.model.moe_token_dispatcher_type = MOE_TOKEN_DISPATCHER_ALLTOALLAlso applies to: 107-107, 133-133, 159-159, 185-185, 211-211, 237-237, 263-263
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@scripts/performance/configs/qwen/qwen3_llm_pretrain.py` at line 81, Replace repeated string literals used for the MoE dispatcher with a module-level constant: define an UPPER_SNAKE_CASE constant (e.g., MOE_TOKEN_DISPATCHER_FLEX = "flex") at the top of the file and use that constant wherever cfg.model.moe_token_dispatcher_type is assigned (including occurrences near lines with cfg.model.moe_token_dispatcher_type and other repeated dispatcher assignments mentioned); update all references (e.g., assignments that currently use "flex") to use the constant to avoid typos and centralize changes.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@scripts/performance/configs/qwen/qwen3_llm_pretrain.py`:
- Line 81: Replace repeated string literals used for the MoE dispatcher with a
module-level constant: define an UPPER_SNAKE_CASE constant (e.g.,
MOE_TOKEN_DISPATCHER_FLEX = "flex") at the top of the file and use that constant
wherever cfg.model.moe_token_dispatcher_type is assigned (including occurrences
near lines with cfg.model.moe_token_dispatcher_type and other repeated
dispatcher assignments mentioned); update all references (e.g., assignments that
currently use "flex") to use the constant to avoid typos and centralize changes.
2461fd3 to
dba7b23
Compare
Signed-off-by: oliver könig <okoenig@nvidia.com> Signed-off-by: Malay Nagda <malayn@nvidia.com> Co-authored-by: Malay Nagda <malayn@nvidia.com> Signed-off-by: oliver könig <okoenig@nvidia.com>
Signed-off-by: oliver könig <okoenig@nvidia.com>
Signed-off-by: Malay Nagda <malayn@nvidia.com>
Signed-off-by: Sanju C Sudhakaran <scsudhakaran@nvidia.com> Co-authored-by: oliver könig <okoenig@nvidia.com> Signed-off-by: oliver könig <okoenig@nvidia.com>
What does this PR do ?
Add a one line overview of what this PR aims to accomplish.
Changelog
GitHub Actions CI
See the CI sectionin the Contributing doc for how to trigger the CI. A Nvidia developer will need to approve and trigger the CI for external contributors.
Before your PR is "Ready for review"
Pre checks:
If you haven't finished some of the above items you can still open "Draft" PR.
Additional Information
Summary by CodeRabbit