Conversation
📝 WalkthroughWalkthroughThe PR modifies the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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)
src/cloudai/workloads/megatron_bridge/slurm_command_gen_strategy.py (1)
391-397:⚠️ Potential issue | 🟡 MinorUpdate the stale
vpbehavior comment to match actual emission.Line 391 says
-vpis not emitted, but Lines 396–397 now intentionally emit-vp Noneby passing the string"None". Please align the comment with the current behavior to avoid future regressions.Suggested fix
- # When vp is 1 (or [1]), pass None so -vp is not emitted in sbatch + # When vp is 1 (or [1]), pass the literal string "None" to the launcher + # so the generated command includes `-vp None`.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/cloudai/workloads/megatron_bridge/slurm_command_gen_strategy.py` around lines 391 - 397, The comment above the vp handling is stale: it says "-vp is not emitted" but the code sets vp_for_launcher to the string "None" so add_field("vp", "-vp", vp_for_launcher) will emit "-vp None"; update the comment to reflect that when args.vp equals 1 (or [1]) we intentionally pass the string "None" so the sbatch argument "-vp None" is emitted, referencing the vp_for_launcher variable and add_field call to locate the logic and adjust the comment accordingly.
🤖 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/workloads/megatron_bridge/test_command_gen_strategy_slurm.py`:
- Around line 457-465: Update the test_vp to cover both normalized vp inputs by
parameterizing the test over the scalar 1 and the single-item list [1] (and/or
tuple (1,)) returned via make_test_run(cmd_args_overrides={"vp": ...}); for each
input create MegatronBridgeSlurmCommandGenStrategy(configured_slurm_system, tr),
call self._wrapper_content(cmd_gen), and assert that "-vp None" is present in
wrapper_content so both the scalar and list/tuple normalization branches in
MegatronBridgeSlurmCommandGenStrategy are exercised.
---
Outside diff comments:
In `@src/cloudai/workloads/megatron_bridge/slurm_command_gen_strategy.py`:
- Around line 391-397: The comment above the vp handling is stale: it says "-vp
is not emitted" but the code sets vp_for_launcher to the string "None" so
add_field("vp", "-vp", vp_for_launcher) will emit "-vp None"; update the comment
to reflect that when args.vp equals 1 (or [1]) we intentionally pass the string
"None" so the sbatch argument "-vp None" is emitted, referencing the
vp_for_launcher variable and add_field call to locate the logic and adjust the
comment accordingly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 18f96f2f-9921-4b18-935b-d10449d398b2
📒 Files selected for processing (2)
src/cloudai/workloads/megatron_bridge/slurm_command_gen_strategy.pytests/workloads/megatron_bridge/test_command_gen_strategy_slurm.py
Summary
vp=1wasn't handled correctlyTest Plan
Additional Notes