Skip to content

fix(ray): name the missing flag instead of failing on int + None - #2519

Draft
Arist12 wants to merge 1 commit into
radixark:mainfrom
Arist12:fix/require-rollout-num-gpus-when-disaggregated
Draft

fix(ray): name the missing flag instead of failing on int + None#2519
Arist12 wants to merge 1 commit into
radixark:mainfrom
Arist12:fix/require-rollout-num-gpus-when-disaggregated

Conversation

@Arist12

@Arist12 Arist12 commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Problem

Without --colocate the rollout GPU count cannot be derived, and leaving --rollout-num-gpus unset surfaces several frames later as

TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'

from placement-group sizing, which never names the flag. --debug-rollout-only has the same gap one step earlier, in miles_validate_args, where the count feeds min(8, ...).

Reproduced by dropping --rollout-num-gpus 1 from examples/lora/run-qwen2.5-3B-megatron-lora-disaggregated.sh.

Fix

Assert at each point of use, naming the flag. Both places, because they are reached by different paths — _get_placement_group_layout for the ordinary disaggregated run, miles_validate_args for --debug-rollout-only, which fails before the placement group is ever built.

Not in miles_validate_args for the general case: about 20 tests in tests/fast/utils/test_arguments.py call it with a minimal argument set (colocate off, rollout_num_gpus unset) and expect it to pass.

Test

One case added to tests/fast/ray/test_placement_group_shared_ppo.py, which already covers _get_placement_group_layout for colocate / debug_train_only / rollout_external with the same fixture.

@Arist12
Arist12 force-pushed the fix/require-rollout-num-gpus-when-disaggregated branch from fd44e51 to 1035093 Compare August 13, 2026 16:32
Without --colocate the rollout GPU count cannot be derived, and leaving --rollout-num-gpus
unset surfaces as a TypeError on None inside placement-group sizing, several frames from the
flag that is missing. --debug-rollout-only has the same gap one step earlier, in
miles_validate_args, where the count feeds min(8, ...).

Assert at each point of use.
@Arist12
Arist12 force-pushed the fix/require-rollout-num-gpus-when-disaggregated branch from 1035093 to ed07904 Compare August 13, 2026 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant