fix(test): cap RL worker GPU memory so test_rl_worker_discovery survives parallel bin-packing - #10602
Conversation
test_rl_worker_discovery_and_engine_admin_routes launches its vLLM worker via a
hardcoded command that omitted the GPU-memory budget every other vLLM e2e test
injects. Under the parallel GPU scheduler the worker is bin-packed onto a shared
GPU but ignored its _PROFILE_OVERRIDE_VLLM_KV_CACHE_BYTES budget, so vLLM fell
back to gpu_memory_utilization=0.9, demanded ~90% of the whole card, and crashed
during engine init ("Free memory ... less than desired GPU memory utilization")
with exit code 1 — surfacing as "Main server process exited with code 1 while
waiting for health check". 77.9% failure rate on main since #9681.
Route the worker command through build_gpu_mem_args("build_vllm_gpu_mem_args")
like the standard vLLM workers, so it honors the scheduler's
--kv-cache-memory-bytes budget under parallel runs and uses a conservative
--gpu-memory-utilization 0.4 fallback when run serially. The test already
declares requested_vllm_kv_cache_bytes(331_801_000); this makes the worker
actually respect it (tests/README.md documents this as a hard requirement).
Reproduced locally under simulated bin-packing (43 GiB held, ~3.5 GiB free):
the unfixed worker dies at the vLLM free-memory check (exit 1); with the fix the
engine initializes within its 0.31 GiB KV budget and proceeds past the memory gate.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2f4d2ca to
d68d60d
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
WalkthroughThe PR refactors vLLM GPU memory configuration in the RL worker discovery test by extracting a reusable helper function. It imports a shared ChangesvLLM GPU Memory Configuration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
Temporarily switch post_merge -> pre_merge so this PR's pre-merge vLLM GPU job runs the test under real parallel bin-packing (gpu_parallel, max 24 GiB) and validates the GPU-memory-budget fix end-to-end. Revert to post_merge before merge. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…PU-mem fix" Validation complete: the test PASSED [78s] in this PR's pre-merge vLLM GPU job on GPU0 under real parallel bin-packing. Restore post_merge gating so the heavy 900s e2e stays out of the per-PR critical path. Leaves the clean GPU-mem fix. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
biswapanda
left a comment
There was a problem hiding this comment.
lgtm - thanks @nv-tusharma !
…ves parallel bin-packing (ai-dynamo#10602) Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Yao, Qing <qing.yao@intel.com>
Problem
tests/rl/test_worker_discovery.py::test_rl_worker_discovery_and_engine_admin_routeshas been failing 77.9% of the time onmainsince it was introduced in #9681, blocking post-merge/PR pipelines. Datadog shows 26 failed pipelines and ~265h of CI time lost. It fails with:Root cause
The test launches its vLLM worker through a hardcoded
RLVllmWorkerProcesscommand that omits the GPU-memory budget every other vLLM e2e test injects. The parallel GPU scheduler bin-packs this worker onto a shared GPU and sets_PROFILE_OVERRIDE_VLLM_KV_CACHE_BYTESfrom the test'srequested_vllm_kv_cache_bytes(331_801_000)marker — but the worker never consumed it, so vLLM fell back to its defaultgpu_memory_utilization=0.9, demanded ~90% of the whole card, and crashed during engine init:This crashes the worker (exit 1) only when it's co-located with other workers on the GPU, which is why it passed ~22% of the time (scheduled first/alone).
tests/README.mddocuments honoring_PROFILE_OVERRIDE_VLLM_KV_CACHE_BYTESas a hard requirement for vLLM launch paths.Fix
Route the worker command through
build_gpu_mem_args("build_vllm_gpu_mem_args")— the same helper the standard vLLM workers (tests/mm_router/*,tests/router/test_router_e2e_with_vllm.py, etc.) use. Under parallel runs it emits--kv-cache-memory-bytes 331801000 --gpu-memory-utilization 0.01(caps the worker to its profiled budget); serially it falls back to--gpu-memory-utilization 0.4.Verification (local A/B, RTX 6000 Ada, simulated bin-packing: 43 GiB held, ~3.5 GiB free)
exit_code=1 after 27s, same503→ process-death pattern as CI.reserved 0.31 GiB memory for KV Cache ... skipped memory profiling,GPU KV cache size: 2,880 tokens,init engine ... took 0.32 s— engine initializes within its budget and proceeds well past the crash point.One-file, test-only change that brings this worker in line with the harness's documented GPU-budget contract.
🤖 Generated with Claude Code
Summary by CodeRabbit