fix(verl): make request aborts take effect on vLLM < 0.9 (pooling_output compat shim) - #590
Conversation
…put compat shim) verl 0.7.x/0.8.x abort paths call RequestState.make_request_output with a pooling_output kwarg that does not exist before vLLM 0.9. On vLLM 0.8.5 the TypeError is swallowed by verl's blanket except, so abort_all_requests silently aborts nothing; orphaned requests keep generating concurrently with the training phase and can crash the run with a CUDA illegal memory access. Apply a signature-detecting shim in every Ray worker process (via the existing worker_process_setup_hook) that drops the kwarg on old vLLM and is a strict no-op elsewhere. Fixes microsoft#589 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
@microsoft-github-policy-service agree |
|
As suggested in https://github.com/microsoft/agent-lightning/blob/main/scripts/setup_verl.sh, the suggested vllm for verl However we are happy to have this fix, but please remove the test and make |
Per maintainer feedback on PR microsoft#590: remove tests/verl/test_vllm_compat.py and trim vllm_compat.py to the essentials (condense the module and function docstrings to a single 3-line comment). No behavior change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Thanks for the review, and good point on the recommended vLLM 0.12.0 for verl 0.7.x — we hit this on a 0.8.5 pairing, and the shim stays a strict no-op on any vLLM that already has Addressed both requests in 6b6ae9c:
|
|
Sure please fix the type check. Then I can merge this PR. |
The Type-check Python (Pyright) CI runs without vLLM installed, so the optional `vllm.v1.engine.output_processor` import is unresolved. Mark it with `# pyright: ignore[reportMissingImports]`, matching the repo's existing convention (see agentlightning/verl/trainer.py). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Fixed — added |
|
Merged. Thank you for the contribution. |
Summary
Fixes #589.
verl 0.7.x/0.8.x (the range Agent Lightning pins:
verl>=0.7.1,<0.9.0) callRequestState.make_request_outputwith apooling_outputkwarg in both abort paths (abort_all_requests/abort_request). That parameter only exists from vLLM 0.9 on; on vLLM 0.8.5 (the minimum of verl 0.7.1's declared range, and a common companion) the call raisesTypeError, which verl's blanketexcept Exceptionswallows:The net effect is that aborts silently do nothing: rollout requests that failed or timed out keep generating inside vLLM while the trainer proceeds to the FSDP update phase. In our production runs this concurrency crashed training with a CUDA illegal memory access in the sampler (
apply_top_k_top_p → logits.sort). Full forensics in #589.What this PR does
agentlightning/verl/vllm_compat.pywith a signature-detecting shim: if the installed vLLM'smake_request_outputhas nopooling_outputparameter, wrap it to drop that kwarg. Positional calls from vLLM's own code path are forwarded untouched; on vLLM >= 0.9 (or vLLM absent) the shim is a strict no-op. It is also idempotent (marker attribute prevents double-wrapping).worker_process_setup_hook(per_rollout_loss.register_in_worker), so it reaches thevLLMHttpServeractor where the abort path runs (verl's actor-levelruntime_envonly setsenv_vars, so the job-level hook is inherited).tests/verl/test_vllm_compat.py) covering: old-signature patching with both call styles, idempotency, new-signature no-op, and vLLM-absent no-op.Validation