Repository navigation
feat(dynamo)!: Dynamo 1.8 nightly, high session cap, frontends across nodes - #5115
Conversation
…end SDK `policy.generation.dynamo: true` on a vLLM generation config is now the whole Dynamo switch. NeMo RL's own vLLM workers register their AsyncLLM with a managed dynamo.frontend through Dynamo's engine-agnostic backend SDK (dynamo.common.backend), from inside each worker's actor loop. No Dynamo-owned vLLM code runs, so refit, pause, quantization, speculative decoding and parallelism are the native backend's own, and a vLLM bump never waits on Dynamo. - One request pipeline (vllm/request_pipeline.py) serves native generate_async, the native OpenAI server and the Dynamo adapter: the sampling-profile check, clamps, R3, token fields, capture, prefix splice and media. - Rollouts go through the frontend's KV-aware router. The engine publishes KV events, and functional overlays fail if the router applies none. - NeMo-Gym calls go through the frontend in Gym's Dynamo dialect (NVIDIA-NeMo/Gym#4817), with engine-side token and media capture. - Startup rejects what Dynamo cannot serve: colocated generation, fleet health, the generation router, a bearer token, R3 with Gym but no capture, parser plugins and chat settings with no frontend counterpart. - Removed: backend: dynamo, DynamoGeneration, the dynamo.vllm launcher, its refit routes, token wrapper, metrics scraper and isolated venv. Old keys are rejected with the migration. - ai-dynamo and ai-dynamo-runtime 1.5.1 join the vllm extra, without the planner deps. BUILD_DYNAMO installs only etcd and nats-server. - CI: the Dynamo lane runs native SingleController tests as overlays: math, Gym token capture, reload refit, and R3 with deferred-route capture. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
Run and CI breaks: - Each engine publishes KV events on its own abstract ipc:// socket, so engines on one node can no longer draw the same port (C1). - Engines get an OS-assigned DYN_SYSTEM_PORT, so a frontend on another node can read a custom chat template (C2). - The Gym capture test skips without nemo_gym (C3). - Gym calls apply the generation config's max_tokens only when the request leaves it unset, as vLLM's server does (C4). - Lint: minimized swe1 recipe (C5) and import order (C6). Behavior: - vLLM client errors reach the client as InvalidArgument with their message, not as a bare 500 (C7). - Non-capture Gym calls return routed experts with R3 on, and Gym#4817 (now a369e28) lifts them, so R3 + Gym no longer needs token capture (C8). - A disconnected capture call fails instead of being staged (C9). - EP > TP is rejected at startup with Dynamo (C10). - The KV-event block size matches vLLM's main-attention kinds (C17). Messages and docs: timeout wording and error (C11, C12), missing etcd/NATS advice (C13), dependency bounds (C19) and ray.sub's port layout (C20). Tests: a Gym-without-capture Dynamo overlay in L1 (C14), the rollout retry loop (C15), media dispatch and failure mapping (C16), hybrid block size (C17) and the Gym engine_data key contract (C18). Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
Resolves the docker/Dockerfile conflict with NVIDIA-NeMo#4340 (uv cache mounts). The BUILD_DYNAMO RUN keeps this branch's form: docker/dynamo/install.sh now only downloads etcd and nats-server, so it is not a uv-writing RUN and takes no uv cache mount. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
Gym#4817 (jthomson04/dynamo-frontend-dialect) is rebased onto Gym main and now sits on top of it; its head moves from a369e28 to a5f936c. The only conflict was Gym main's new custom-tool-strategy validator, which sits next to the Dynamo frontend validator; both are kept. Gym's dependencies are unchanged, so uv.lock needs no change. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
…osition From the NVIDIA-NeMo#4905 review: - C23: setup_nemo_gym_config wrote the dialect as a top-level policy_model overlay, which a sharded Gym plan rejects as unowned. Setup now stashes it under a NeMo RL key (dynamo_dialect, alongside tokenizer_config), and _build_gym_actor_config applies it to each actor's composed config. A shard's own template kwargs still win over the native defaults. - C24: the local install instructions export NEMO_RL_DYNAMO_BIN_DIR, so the run that follows finds etcd and nats-server. - C25: the two in-function rationale blocks in native_engine.py are one line each; the design doc carries the full reasons. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
Resolve examples/configs/grpo_math_1B.yaml: keep main's new lora_refit_mode default and this branch's comment, which no longer lists the removed dynamo backend. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
Resolve tests/unit/algorithms/test_grpo.py: main (NVIDIA-NeMo#4712) added Gym log-dir assertions to test_setup_initializes_noncolocated_dynamo_with_nemo_gym, which this branch deletes with backend: dynamo. The log-dir fix is not Dynamo-specific, so its assertions move to the surviving Gym setup test, test_setup_starts_nemo_gym_for_trtllm, with the same parametrization. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
Resolve the configure_generation_config conflict: keep this branch's vllm-only block (backend: dynamo is removed) with NVIDIA-NeMo#4554's reworded load_format comment. NVIDIA-NeMo#4554 also makes setup_nemo_gym_config read config.data, so give the two Dynamo dialect tests' configs data={} as upstream did for its own tests. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
Resolves the conflict in nemo_rl/utils/routed_experts_codec.py: this branch added routed_experts_envelope_dtype and NVIDIA-NeMo#4915 added slice_routed_experts at the same spot. Both are kept. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
…helpers Split generate_async's per-sample work into building the result (request_pipeline.rollout_result: sampled logprobs, router-replay route alignment and its fallback warning) and assembling the output tensors (rollout_output). The rollout token budget and SamplingParams become worker methods (_rollout_max_new_tokens, _rollout_sampling_params). vllm/utils gains off_policy_sampling_error (the chat endpoint's on-policy checks, unchanged) and chat_routed_experts / chat_generation_tokens (the loop bodies of the attach_* response helpers). No behaviour change for native vLLM: the new generate_async wiring tests pass against both the old and the new implementation. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
…engine Stacks this PR on the vLLM request-pipeline refactor split out at review request; brings in upstream main 0b305c9. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
At review request, NeMo-Gym through the Dynamo frontend moves to a follow-up PR that waits on NVIDIA-NeMo/Gym#4817, so this PR no longer needs a Gym bump: - Gym's submodule is back on main's pin. - The engine's Gym path (_generate_gym, capture staging, prefix splice), the Gym dialect setup, session affinity, client_base_urls and the Gym-only startup checks move to the follow-up. - NeMo-Gym with policy.generation.dynamo=true is refused at startup in should_use_nemo_gym, before any cluster starts. - The Dynamo L1 keeps its SingleController math and reload-refit overlays; the swe1 Dynamo + Gym nightly is disabled until the follow-up. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
Restores NeMo-Gym support under policy.generation.dynamo=true, split out of the Dynamo core PR at review request: - Gym's policy model calls the frontend in Gym's Dynamo dialect (NVIDIA-NeMo/Gym#4817); the engine serves those calls as the native chat endpoint does: on-policy sampling check, echoed-prefix splice, context clamp, token fields and routed experts in engine_data. - Token capture stages from the engine process (dynamo_worker backend), with frontend session affinity keeping a rollout on one engine. - The Dynamo L1 regains its three Gym overlays, and the swe1 Dynamo + Gym nightly is re-enabled. - Gym is pinned to Gym#4817's rebased head b0e681c; uv.lock records Gym's updated requirements (no resolved versions change). Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
Address review on this PR: - _serve_rollout runs a rollout's whole sequence (budget, nothing-fits, SamplingParams, generate, prompt check, result), so every host that serves a rollout from this engine calls one method instead of copying the steps. It replaces _rollout_sampling_params. - generate_async asserts a single sample, so it no longer fans out per-sample tasks: it formats the prompt, calls _serve_rollout and yields the output. vLLM still aborts the request on cancellation. - rollout_output drops pad_token_id, whose fill never reached the output. - off_policy_sampling_error documents that vLLM fills unset top_p/top_k from generation_config.json, so callers must pin top_k=-1. - chat_routed_experts drops a dead isinstance check. - Tests: a route test for the on-policy assert and the top_k pin; the budget tests fold into one parametrization that covers a full context with speculative decoding; the wiring test asserts the exact output keys and a missing logprob; the R3 pipeline test uses vLLM 0.29's route shape. Two pipeline tests the wiring tests now cover are removed. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
…engine Brings in NVIDIA-NeMo#4978's review fixes. The engine's rollout path now calls the worker's _serve_rollout instead of re-typing its steps, and the driver drops rollout_output's removed pad_token_id. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
Brings in NVIDIA-NeMo#4978's review fixes through NVIDIA-NeMo#4905: the engine's rollout path calls the worker's _serve_rollout. The Gym path is unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
The Gym re-pin crosses Gym#4128 (rollout_id -> capture_key, staging schema 3) and Gym#4858 (config-path aliases removed): - Data-plane test fixtures build records and receipts with capture_key and STAGING_SCHEMA_VERSION; the captured-media lineage case uses capture_key. - NeMo RL reads Gym's capture models by capture_key (admission, snapshot, staged record, receipt) instead of the deprecated alias. NeMo RL's own TQ column and tag names keep rollout_id. - The QA distillation recipe lists verifiers_agent.yaml, the target of the removed acereason-math.yaml alias. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
…m path Review fixes: - Default frontend session affinity to 300 s (Dynamo caps the table at 65,536 sessions and answers 529 past it), bounded by the frontend's max. - Never stage a call vLLM ended with finish_reason "error" (raise first, as vLLM's chat server does); decode special tokens as the request asks when vLLM matches stop strings, so engine and frontend stop at the same place. - Read Gym's NG_COMMIT_COORDS_FIELD instead of copying the key. - Raise the frontend HTTP body and request-plane message limits for inline Gym media. - Reject vllm_model.extra_body.bad_words at setup (the frontend 400s it). - Tests for the disconnect branch, the media-placeholder guard and the error finish; the dialect test reads fields back through Gym's VLLMModelConfig. Docs list the template-kwargs and 4-stop limits. - Keep the receipt dict's rollout_id key: NeMo RL's recovery and manager identity checks read it, and Gym still accepts the alias. - swe1 drops request_timeout_s (nothing reads it for Gym calls). Simplifications: - splice_prefix_tokens(template_prefix_token_ids=None) replaces derive_prefix_eos_count and template_prefix_eos_count. - One _gym_message builds the native message fields for both the staged and the engine_data paths; no separate staged flag (staging pops the capture). - The dialect key stores the template kwargs directly. - Fold duplicate and circular tests into parametrized cases; drop the unused Omni Dynamo hook and repeated guide text. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
…k only on dialect servers) Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
…ves to NVIDIA-NeMo#4979 After the NeMo-Gym split nothing in this PR calls the engine's general OpenAI path, so it moves to NVIDIA-NeMo#4979 with Gym, its only client: - NativeVllmEngine serves requests carrying ROLLOUT_ANNOTATION and refuses the rest. build_sampling_params, guided decoding, media loading, prompt logprobs, queue-limit mapping and the parser/chat-template registration go, and engines register endpoint_types="completions". - dynamo_cfg.worker_args (parsers, chat template, structural tags, endpoint types) is removed and rejected at startup with the migration. - DYN_ENABLE_EXPERIMENTAL_PARSERS_V2 goes: only Dynamo's chat path reads it, and /v1/completions returns engine_data via nvext.extra_fields. - The engine keeps skip_tokenizer_init as native chooses it, so rollouts skip detokenization as they do natively. NVIDIA-NeMo#4979 restores all of this by reverting this commit. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
…, C39-C45) - C26: dynamo_cfg.request_timeout_s defaults to None. It bounded the whole generation, which native never does, so long rollouts were dropped and re-sampled; on the SingleController native.generation_timeout_s bounds both paths. - C28: router_mode no longer accepts "direct", which needs a worker ID that rollouts never carry. - C29: the EP > TP rejection gives the real reason: vLLM refuses the per-engine ipc:// KV-event endpoint above DP rank 0. - C30: http_server_api_key_required is rejected again: the frontend serves the same engines on 0.0.0.0 with no bearer check. - C31: kv_event_sources connects a wildcard endpoint to 127.0.0.1. - C33: one driver test checks the request sent on success, the assembled output, and the 503 -> GenerationUnavailable mapping. - C34: check_dynamo_overlay.sh requires published KV events, and each failure prints its reason. - C36: frontend_args.tokenizer* are removed (rollouts send token IDs, so the frontend never tokenizes) and rejected at startup. - C37/C39: docs say non-colocated and non-Gym recipes, and state the adapter's own vLLM calls. - C40-C45: real WorkerConfig in the registration test, ai-dynamo pytest plugins disabled, http_status_is_infra reused, num_gpu_blocks read from vllm_config, DYN_SDK_DISABLE_ANSI_LOGGING set in the actor env, Gym-only test fakes removed. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
No behaviour change: - rollout_client absorbs http_client (its only user), and the HTTP tests fold into one parametrized test. - venv.py goes: the frontend runs from worker_group.py_executable, the venv the engines already use, and etcd/nats-server are found with shutil.which in managed_runtime. - arguments.py goes: managed_runtime builds the fixed frontend argv and still rejects extra_cli_args that repeat a managed flag. Nothing logged carries credentials, so the redaction helpers go too. - decode_routed_experts(dtype=None) keeps the envelope's dtype, replacing routed_experts_envelope_dtype; the wire codec drops an impossible check. - managed_runtime: an unreachable namespace check, the atexit flag and the per-port allocation boilerplate go. - The swe1 Dynamo + NeMo-Gym recipe, its driver and its config test move to NVIDIA-NeMo#4979 with the Gym path that can run them. - Tests: on/off config cases folded (with a check that the exemplar spells out exactly the DynamoCfg defaults), outdated-config cases parametrized, the redundant pin test and a GRPO helper's test removed. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
… path moves to NVIDIA-NeMo#4979" This reverts commit ed3ee35 on NVIDIA-NeMo#4979's side of the stack: NVIDIA-NeMo#4979 keeps the general OpenAI path (parsers, chat templates, build_sampling_params, media, prompt logprobs, PARSERS_V2, the skip_tokenizer_init override) that NVIDIA-NeMo#4905 now leaves out. Conflicts with NVIDIA-NeMo#4905's later commits keep those commits' changes: request_timeout_s defaults to None, frontend tokenizer knobs stay removed, arguments.py and redaction stay deleted, the api-key rejection keeps its Gym-free reason, and dynamo/__init__.py stays header-only. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
NVIDIA-NeMo#4905 (1e73994) now serves only NeMo RL rollouts and moved the general OpenAI path here; this merges it through tmp 4aedf28, which reverts that removal (ed3ee35) so NVIDIA-NeMo#4979 keeps the OpenAI path for NeMo-Gym. Conflicts keep NVIDIA-NeMo#4905's later changes (request_timeout_s defaults to None, frontend tokenizer knobs removed, api-key rejection with its Gym-free reason, arguments.py and redaction deleted) and NVIDIA-NeMo#4979's own: - session affinity moves into managed_runtime.frontend_argv; - the swe1 Dynamo + Gym recipe, its driver, test_swe1_dynamo_config.py and its L0 unit-test arguments are restored (nightly stays enabled), without the removed tokenizer knobs; - the client_base_urls check folds into NVIDIA-NeMo#4905's frontend rollout test; - the engine test fakes keep what the Gym path reads (val_* sampling, is_stopped, _Tokenizer). Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
Resolve two additive conflicts: - outdated_config_checks.py: keep this branch's reject_outdated_dynamo_backend and main's new reject_outdated_context_compaction, both called from check_outdated_config. - test_nemo_gym_token_capture.py: keep this branch's Dynamo + NeMo-Gym startup refusal test in place of main's old Dynamo HTTP-server test, plus main's three new receipt/forest tests. Main also moves the Gym pin to 5911d628c; uv.lock stays consistent with it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
Brings in NVIDIA-NeMo#4905's merge of upstream main. Conflicts: - tq_token_sink.py, token_capture_test_fixtures.py: take main's names. Main renamed RL's staging column to capture_key_utf8 and the tag key to capture_key, and imports Gym's digest-version constants. - vllm_worker_async.py: take main's include_route_fragments=verify_retained_media on the parent-chain fetch; this branch's _parse_capture_admission split stays. - test_nemo_gym_token_capture.py: keep this branch's Dynamo dialect test in place of NVIDIA-NeMo#4905's startup refusal, plus main's three new receipt/forest tests. Gym stays pinned at Gym#4817's head a7be5c5, which descends from main's 5911d628c. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
Resolve tests/unit/single_controller/test_setup.py: keep main's new forest checkpoint tests and drop the legacy DynamoGeneration tests this branch removes. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
Resolves conflicts with NVIDIA-NeMo#4818 (score centering): keep both chat_generation_tokens and attach_sampler_topk_logprobs_to_chat_response_choices in vllm/utils.py, and add test_score_centering.py to the L0 vLLM shards while keeping test_swe1_dynamo_config.py out (it moved to NVIDIA-NeMo#4979). Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
|
Auto-sync is disabled for ready for review pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
/ok to test 7f28b6e |
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
I found one non-blocking configuration-validation bug, reported as C15.
The earlier cache-salt failure is fixed in the text-prompt branch. The frontend actor now requests zero CPUs, and the functional lane includes two-frontends token capture.
The three topic reviews covered all 40 changed paths and their directly affected callers. This was source inspection only: no tests or linters ran, and current CI results were not supplied. Dynamo's dependency source and populated Gym submodule source were unavailable, so their external contracts were not independently verified. The description still identifies the multi-node run and release pin as outstanding before-merge work.
Review generated by codex. This was a full review. Request a full review with /review reset=true.
terrykong
left a comment
There was a problem hiding this comment.
Team review of the Dynamo 1.8 move. The design is a clear step forward: Dynamo's supported hooks replace the frontend monkeypatch and the logging patch, four env vars became one typed ChatProcessorOptions, the native and Dynamo cut routes share one small helper (answer_generation_cut), and the new runtime pieces can be unit-tested without Ray or a GPU. Reviewed at 9d420a1; the current head 7f28b6e only merges main after #4979 landed, and the PR's own diff is unchanged, so links stay pinned to 9d420a1. We checked the author's own C1–C14 there. Of the 12 marked done, 10 are fully fixed; C1 is partly fixed (C19) and C3 fixed the guide but not the code comment (C20).
New comments:
- (C15)
wait_for_enginesreports the previous frontend's counts when the next one never answers. - (C16) The
extra_cli_argsdocs row misses the third rejected flag. - (C21) When one frontend dies, Gym retries its URL forever and the run hangs. Gym already has
route_around_failing_endpointsandendpoint_connection_retry_timeout_s; RL should turn both on whenever Gym gets more than one URL (RL-only change). - (C22, optional) Restart a dead frontend on the same port, so Gym's trial call can pick it back up.
- (C23) Frontend ports: picked, released, then bound seconds later, in a range that overlaps the vLLM servers' range. Give the frontends their own range and retry the launch on a failed bind.
- (C24, small) Log each frontend's
/metrics(queued and in-flight calls) next to the vLLM metrics. - (C25, small) Traces: turn on Dynamo's OTLP export when RL exports traces, and pass the trace to vLLM's
generate, so Dynamo calls join Gym's trace as native ones do.
Replies on existing threads:
8. (C17) On C10: please add the router-mode parser test; this PR's own power-of-two removal is the case it catches.
9. (C18) On C14: what the pending multi-node run should report, including the default frontend's move onto a GPU node.
10. (C19) On C1: parity cases for the other five token-level fields.
11. (C20) On C3: the code comment still describes the non-kv router modes wrong.
Visual explainers: https://terrykong.github.io/gh-pages-poc/terryk/pr-5115-frontends-across-nodes.html (what moves) and https://terrykong.github.io/gh-pages-poc/terryk/pr-5115-dead-frontend.html (C21, C22)
Generated by Claude Code
There was a problem hiding this comment.
Review of the head 7f28b6e2bd against main (67b41a0db3), all 40 files, by a team of six reviewers, two adversarial passes and an editor.
What holds up. One cut handler serves the native route and the Dynamo route, and the native route answers as on main. The control port and the code that carried its URL are gone everywhere. Supported Dynamo hooks replace three monkeypatches. One typed options record replaces three environment variables. The service watchdog lets three functional scripts drop their own clean-up. The earlier comments C1 to C9, C11 and C12 are fixed at this head (the C1 and C11 fixes were checked again by reverting them), the decline of C10 still holds, and the trim commit 9d420a1440 lost no test coverage.
What was checked. 49 upstream facts the PR relies on, against the pinned Dynamo, vLLM, Ray and NeMo-Gym: 47 hold as written and 2 are worded loosely (C30, C32). Much of it was measured on the real dynamo.frontend from the published 1.8.0.dev20261117 wheels with stand-in engines, CPU only. No functional test and no GPU run was done. Lint is clean at the head with the hooks' own tools (ruff 0.9.9 check, import sort and format; taplo; pyrefly; the config minimize check); pre-commit itself was not run.
Comments.
- (C26) The frontend is no longer the driver's child, so it loses what the driver sets after
init_ray()(fastokens) and the driver's raised open-file limit. One suggestion. - (C27) Render workers outlive a frontend that Ray kills. The fix is in the render pool.
- (C28) With several frontends, the start-up timeout prints the wrong frontend's counts. One suggestion.
- (C29) No test passes a
render_workersother than the default to a frontend;main's test did. One suggestion. - (C30) The design doc does not name the vLLM plugin that ai-dynamo now installs in every vLLM process. One suggestion.
- (C31) The guide has no rule for a frontend's open-file limit. One suggestion.
- (C32) Five edits to the PR description.
- (C33) A reply on the open thread C14: what the multi-node run still has to show, and the numbers measured here.
Already on the PR. The /review bot's comment that calls itself C15 (extra_env accepts NEMO_RL_DYNAMO_CAPTURE_FILE and the launch then overwrites it) is correct; the case was run here. Its one-line fix and C26's suggestion change different lines, so both can be applied.
No ask in this PR.
shutdown()stops the frontends one after another, about 4 s each in the two-frontend CI run.- When the pin moves to the 1.8.0 release, run Dynamo's own argument parser once on the frontend's argument list for every router mode: no CI test starts the four modes that are not
kv. - Already on
main, not from this PR:- a NeMo-Gym call marked as untrained that leaves out
temperatureortop_praisesKeyErrorin the chat engine (the pinned NeMo-Gym cannot send such a call yet); - the shipped-config test does not validate a config's
dynamo_cfgblock, so a mistyped key in the example passes.
- a NeMo-Gym call marked as untrained that leaves out
- A frontend's output now reaches the driver through Ray's log pipeline, two lines per request. The log volume is worth a look in the multi-node run.
Generated by Claude Code
Fixes for the review comments on NVIDIA-NeMo#5115 (Terry's C15-C24, the review bot's extra_env comment, and C26-C31): - wait_for_engines resets its counts when it moves to the next frontend, so a start-up timeout reports the frontend it names (C15). - extra_env may not set the frontend's capture-file variable, which the launch overwrites (bot C15). - A frontend gets the driver's current environment, as the engines do, and the open-file limit it had as the driver's child (C26). - A render worker exits once its frontend is gone, so a frontend that is killed outright leaves none behind (C27). - With more than one frontend, NeMo-Gym moves the sessions of a frontend that stops answering to the others instead of retrying it forever (C21). - Frontends pick their ports from Dynamo's band, each from its own slice on a node, not from the range the vLLM workers reserve from (C23). - The SingleController's rollout telemetry logs the calls queued and in flight in the frontends (C24). - Tests: Dynamo's parser accepts the arguments of every router mode (C17), the parity test sends token-level fields (C19), and a frontend is started with a render_workers other than the default (C29). - Docs and one comment (C16, C20, C30, C31). Co-Authored-By: Claude Fable 5.2 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
|
/ok to test 3ef5734 |
…nd's load, carry traces to vLLM Follow-ups to the round-3 review of NVIDIA-NeMo#5115 (C23, C24, C25). - C23: FrontendHost.start waits for its frontend. A frontend that exits before /health answers lost its port to another process between the pick and the bind, so the host picks another port from its slice and launches it again, three launches at most. - C24: the SingleController logs each frontend's queued and in-flight calls next to the sums, and the driver prints the frontend URLs in index order. - C25: with telemetry.vllm_native_tracing on, the frontends and the vLLM workers get OTEL_EXPORT_ENABLED from process start, and the adapter passes the call's trace headers to vLLM, so vLLM's request span joins the trace of the frontend's request span. The frontend does not continue NeMo-Gym's trace yet: Dynamo ignores a traceparent whose trace flags are 03 (ai-dynamo/dynamo#19106). Co-Authored-By: Claude Fable 5.2 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
|
/ok to test a4c0a45 |
…ge-stage test JSONL) into jthomson04/dynamo-1.7 Co-Authored-By: Claude Fable 5.2 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
|
/ok to test 517282b |
… chat paths The token_level_fields parity case gains logprob_token_ids, one of the token-level fields whose start-up refusal this PR removed. vLLM leaves SamplingParams.logprobs unset when logprob_token_ids is given, so the test's engine now returns log-probs whenever num_logprobs is set, as vLLM's own engine does, with the requested tokens at every position. Co-Authored-By: Claude Fable 5.2 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
|
/ok to test 9febad2 |
…4/dynamo-1.7 One conflict, in tests/functional/_gym_prefix_recovery_phases.sh: main's header comment is kept without its PHASE1_RUN_LOG sentence, and the PHASE1_RUN_LOG assignment main adds in run_prefix_recovery_phases is dropped. This branch removed that variable with the helper's Dynamo orphan cleanup (45b1259): the Dynamo services stop when their starter is killed. Co-Authored-By: Claude Fable 5.2 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
|
/ok to test c6953be |
|
/ok to test 9b909d8 |
main renamed VllmGeneration.dynamo_frontend_url to the dynamo_frontend_urls tuple (#5115), so the test no longer routed through Dynamo and failed on the missing async_engine key. Signed-off-by: Valentin Mendelev <[email protected]>
What
This moves the Dynamo backend to the
1.8.0.dev20261117nightly, lifts two limits a large run hits (about 0.5M rollouts in flight), and removes the workarounds Dynamo has since fixed.frontend_args.session_affinity_max_entries(default 16,777,216) replaces Dynamo's fixed 65,536 affinity sessions.mainit is a child process of the driver.frontend_args.num_frontendsstarts more of them, spread over the generation nodes. etcd and NATS stay on the driver. A NeMo-Gym session stays on one frontend, and with more than one frontend NeMo-Gym moves the sessions of a frontend that stops answering to the others.enable_vllm_metrics_loggeron, the SingleController logs the calls queued and in flight in the frontends, summed (rollout/throughput/dynamo_frontend_requests_queuedand..._inflight) and for each frontend (dynamo_frontend_<i>_requests_...).telemetry.vllm_native_tracingon, the frontends and the vLLM workers get Dynamo's trace export switch, and vLLM's request span joins the frontend's trace. The frontend does not continue NeMo-Gym's trace yet: Dynamo ignores atraceparentwhose trace flags are03([BUG]: Frontend ignores a traceparent with trace-flags 03 and starts a new trace ai-dynamo/dynamo#19106).frontend_args.extra_envfor frontend settings that have no flag, and a watchdog that stops etcd, NATS and frontends whose starter was killed.Breaking
router_mode: power-of-twois rejected at startup, because Dynamo removed that router. Useleast-loadedorkv.Dependencies
ai-dynamoandai-dynamo-runtimemove from 1.5.1 to 1.8.0.dev20261117, andredisis added.vllmextra, pydantic moves from 2.13.0 to 2.13.5 and pydantic-core from 2.46.0 to 2.46.5, the versions the other extras already use, so the native vLLM environment changes too.vllm.general_pluginsentry point, which every vLLM process loads. It changes the environment only whenNIXL_TELEMETRY_ENABLEis set to a false value (0,n,no,off,false,disable): it then removes that variable andNIXL_TELEMETRY_DIRand setsNIXL_TELEMETRY_EXPORTER=NOP. With the pinnednixl1.3.0 that changes one log line.Before merge
Testing
On the published 1.8.0.dev20261117 wheels with vLLM 0.33:
Unit, at
a4c0a459e2: vLLM 69 passed, vLLM + Gym 76, Gym 70, default 711, config 460. Ten more default-lane cases neednemo_automodeland run only in CI.Functional through Dynamo, 2 GPUs, at
3ef57345c8:grpo_dp_single_controller.sh, and Gym token capture with 2 frontends;Each passes
check_dynamo_overlay.sh, which finds no frontend, etcd or NATS process left. In the two runs that kill a frontend or the driver, no render worker is left either.Tracing, 2 GPUs, on
a4c0a459e2's code: Gym token capture withtelemetry.vllm_native_tracingon and a local OTLP receiver. Natively all 81 vLLM request spans are children of NeMo-Gym's client span; through Dynamo all 87 are under Dynamo's engine span, in the frontend's trace.Multi-node, 90 nodes on HSG,
num_frontends: 8, on an earlier head (2223026f38, with fix(gym): size every Gym actor's max_concurrency from the rollout fan-in #5117): 20 generation nodes with 40 engines, a NeMo-Gym RLVR recipe, 10 steps of 16,384 rollouts at lag 8 (147,456 calls in flight at the start).check_dynamo_overlay.shpasses.A real frontend whose first port was held by another socket came up on its second pick (the relaunch added in
a4c0a459e2).Two HSG nodes, at
3ef57345c8, no engine: the driver, etcd and NATS on one node and two frontends pinned to the other. The frontends took ports 1324 and 1366, answered the driver by node IP at start-up and at shutdown, had the environment the driver set afterray.init()and an open-file limit of 524,288, and stopped in 2.9 s with nothing left on either node.🤖 Generated with Claude Code