Fix/slime sglang data parallel size - #92
Conversation
| # Required by agentcore_rl_toolkit.backends.slime.{gateway,rollout,traces}. | ||
| "rllm-model-gateway>=0.1.0", | ||
| # SlimeRunner orchestrates training via ray (ray start, ray stop, ray job submit). | ||
| "ray", |
There was a problem hiding this comment.
I think this is not needed? In our installation guide https://awslabs.github.io/agentcore-rl-toolkit/guides/slime-backend-setup/#installation, choose either option A through slime official docker, or option B through install script https://github.com/awslabs/agentcore-rl-toolkit/blob/main/src/agentcore_rl_toolkit/backends/slime/scripts/install_slime.sh, we both need to install slime's dependencies, and ray is included (https://github.com/THUDM/slime/blob/main/requirements.txt#L18)
lyzustc
left a comment
There was a problem hiding this comment.
Thanks for contribution! Codes about adding sglang data parallel size look good to me, but I think there is no need to add ray to pyproject.toml as ray is already the dependency of slime package. Also please address merge conflicts in uv.lock.
1daf1e0 to
45509ca
Compare
|
Thanks @lyzustc, yes agreed on ray and have removed that commit and rebased on main |
Problem
SlimeRunner._build_slime_flags() doesn't pass --sglang-data-parallel-size to slime's train.py. Slime versions after commit fa3c990 added validation at sglang_utils/arguments.py:142 that reads args.sglang_data_parallel_size — an attribute that only exists if argparse registers it via the CLI flag. Since SlimeRunner never passed it, argparse never creates the attribute, and validation crashes with AttributeError.
Additionally, the [slime] extra was missing ray as a dependency despite SlimeRunner directly invoking ray start, ray stop, and ray job submit.
Fix
Tests
Additionally this fix was tested for small scale RL experiments using a manual patch internally.