exp(dynamo): researcher-ready native sidecar integration on current main - #3213
exp(dynamo): researcher-ready native sidecar integration on current main#3213samsja wants to merge 9 commits into
Conversation
33852ec to
269d2ca
Compare
269d2ca to
6e8bb6d
Compare
1eea517 to
d384e2c
Compare
d384e2c to
e9d3f87
Compare
| if self.inference is None and self.weight_broadcast.inference_world_size is not None: | ||
| return self | ||
| if self.deployment.num_train_gpus + self.deployment.num_infer_gpus < 2: | ||
| raise ValueError("NCCL weight broadcast requires at least 2 local GPUs or external inference ranks.") |
There was a problem hiding this comment.
NCCL GPU check crashes on None
Medium Severity
validate_enough_devices_for_nccl reads self.weight_broadcast.inference_world_size while weight_broadcast is still optional and this validator runs before auto_setup_weight_broadcast fills it. An RL config that sets trainer NCCL without a top-level weight_broadcast block now raises AttributeError during validation instead of a config error or the previous GPU check.
Reviewed by Cursor Bugbot for commit e9d3f87. Configure here.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 33d5cda. Configure here.
| --python "$DYNAMO_PYTHON" --data-parallel-size 1 "${managed_args[@]}" \ | ||
| --tensor-parallel-size "$INFERENCE_TP" \ | ||
| --worker-extension-cls prime_rl.inference.vllm.worker.nccl.NCCLWeightUpdateWorker \ | ||
| "${vllm_args[@]}" >> "$log" 2>&1 & |
There was a problem hiding this comment.
SLURM vLLM launch omits engine split
High Severity
The SLURM Dynamo engine command never inserts the -- splitter that every validated vllm-rs serve invocation uses to separate Rust frontend flags from Python EngineCore flags. --worker-extension-cls, --tensor-parallel-size, --max-model-len, and the generated dynamo_vllm_args are therefore parsed as frontend arguments, so managed engines fail to start and NCCL weight updates cannot attach.
Reviewed by Cursor Bugbot for commit 33d5cda. Configure here.


Summary
Research integration branch for testing Prime-RL against Dynamo's native vLLM sidecar path. This ports the combined implementation from #3181 onto current
mainwithout modifying Biswa's branches or PRs.The branch includes:
/v1/rl/workersdiscovery for direct vLLM admin endpoints and per-engine world sizesPinned researcher stack
biswapanda/vllm@e74fc3fai-dynamo/dynamo@fc556d9main@8c1f196ddPublic vLLM 0.26 and Dynamo 1.3.0 wheels do not contain the complete tested stack. The scripts below build the matching vLLM wheel, Dynamo wheels, and
dynamo-vllm-sidecarexecutable. The custom inference dependencies are installed into.venv-dynamo, isolated from Prime-RL's trainer environment.Hardware and software prerequisites
The local smoke test requires:
uvetcd,curl, andjqavailable onPATHGPU assignment in the checked-in runbook:
Build and install
Run from the root of this PR checkout:
The scripts verify the pinned seven-character revisions before building. Expected outputs:
Do not replace these artifacts with
uv sync --extra dynamo: the released packages do not contain this complete integration.Start the local stack
Run each command in a separate terminal from the repository root.
Terminal 1: etcd
Terminal 2: custom vLLM on GPU 0
This exposes native inference gRPC on port
50051and the vLLM HTTP/admin API on port8002.Terminal 3: Dynamo frontend
Dynamo serves OpenAI-compatible generation on port
8000and RL worker discovery on port8001.Terminal 4: Dynamo vLLM sidecar
The sidecar routes Dynamo generation to vLLM over gRPC and advertises vLLM's direct admin endpoint to Prime-RL.
Verify the stack
Do not start training until both commands succeed:
The worker snapshot must have:
protocol_version == 1Qwen/Qwen3-0.6Badmin_base_url == "http://127.0.0.1:8002"errorworld_size == 1Optional pre-training generation check:
Run Prime-RL on GPU 1
The config sends rollout generation to
http://127.0.0.1:8000/v1, discovers the direct vLLM control endpoint throughhttp://127.0.0.1:8001/v1/rl/workers, and transfers policy weights directly from the trainer to the vLLM worker using NCCL.Success criteria:
The checked-in version of this runbook is
examples/dynamo/local/README.md. Larger deployment recipes are underexamples/dynamo/.SLURM-managed Dynamo
Set
[dynamo] enabled = truein a multi-node RL config to replace the normal globalvllm-routerlaunch with a managed aggregated Dynamo stack. The launcher starts job-local etcd and the Dynamo frontend on inference node zero, plus one native-gRPC vLLM engine anddynamo-vllm-sidecarper local DP rank. It injects the frontend and discovery URLs into the orchestrator, supervises all processes through the existing Slurm job step, and cleans stale Dynamo processes on startup.Prepare the pinned artifacts once, then submit the checked-in example:
Render and validate the job without submitting:
Configuration and scaling details are in
examples/dynamo/slurm-managed/README.md. The initial launcher supports aggregated dense inference on dedicated inference nodes with a shared project filesystem. Disaggregated P/D and cross-engine expert parallelism are rejected explicitly.Validation completed
bash -n; example TOMLs parse successfullybash -nThe source artifact builds and full two-GPU run remain the research-host validation step. The larger GLM recipe additionally requires the optional
r2e-gymenvironment package.