Skip to content

Commit 338247c

Browse files
lauradangclaude
andcommitted
feat(dynamo): adapter sidecar actor for Megatron engines behind Dynamo
Run Megatron-LM's Dynamo adapter in external-launch mode next to each Megatron engine NeMo RL owns, so the Dynamo frontend can route to engines it did not start. build_megatron_adapter_argv assembles the adapter command line and rejects user overrides of pool-owned flags; engine_layout_argv records TP/PP/EP from the same merged inference layout the engine workers use. DynamoMegatronAdapterActor runs one adapter subprocess per engine with node-local port picks, a readiness wait, handoff-recovery attestation, and process-group shutdown, and is registered in the dynamo extra's venv. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Laura Dang <laurad@nvidia.com>
1 parent 67c54f0 commit 338247c

4 files changed

Lines changed: 765 additions & 0 deletions

File tree

‎nemo_rl/distributed/actor_environments.py‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@
5858
# and those vLLM workers load NeMo RL's worker extension, so the venv needs
5959
# nemo_rl, vLLM and ai-dynamo together.
6060
"nemo_rl.models.generation.dynamo.dynamo_worker.DynamoVllmWorker": ["dynamo"],
61+
# Same venv: the sidecar launches Megatron-LM's Dynamo adapter with its own
62+
# interpreter, so the adapter and the frontend share one ai-dynamo install.
63+
"nemo_rl.models.generation.dynamo.megatron_worker_pool.DynamoMegatronAdapterActor": [
64+
"dynamo"
65+
],
6166
"nemo_rl.models.policy.workers.automodel_policy_worker.AutomodelPolicyWorker": [
6267
"automodel"
6368
],

0 commit comments

Comments
 (0)