fix(vllm): serialize routed_experts as base64 with start offset - #10529
Conversation
WalkthroughRouted-experts serialization is updated to use base64 encoding instead of base85 and extended with an optional ChangesRouted-experts serialization with start offset
🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@components/src/dynamo/vllm/tests/test_vllm_worker_handler.py`:
- Around line 367-370: The test currently blanket-catches all exceptions when
assigning sampling_params.routed_experts_prompt_start which can hide unrelated
regressions; change the broad except Exception to only catch the specific
unsupported-assignment errors (e.g., except (AttributeError, TypeError):) so
only missing/unsupported attribute assignments trigger pytest.skip and any other
exceptions are allowed to surface and fail the test; locate the assignment to
sampling_params.routed_experts_prompt_start in the test_vllm_worker_handler.py
test and restrict the catch accordingly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: f0747d31-d964-4aaa-a22b-dd232f2f8163
📒 Files selected for processing (2)
components/src/dynamo/vllm/handlers.pycomponents/src/dynamo/vllm/tests/test_vllm_worker_handler.py
… comment; test int16
…ynamo#10529) Signed-off-by: shenls <shenlinshan@kanzhun.com>
…ynamo#10529) Signed-off-by: Yao, Qing <qing.yao@intel.com>
Overview:
Make MoE routed-experts capture portable for RL log-prob recomputation: base64-encoded with a
startoffset so consumers can align the routing to the completion.Details:
_serialize_routed_expertsnow:startfield (= SamplingParams.routed_experts_prompt_start, the leading prompt rows vLLM trims) so consumers can slice to the completion;shapeanddtypeso the consumer reads the right element width instead of assuming a fixed type.The token-generation path forwards
startfrom the request's sampling params (0 when unset).Where should the reviewer start?
components/src/dynamo/vllm/handlers.py—_serialize_routed_expertsand its call site in the token-generation path.Related Issues
🚫 This PR is NOT linked to an issue:
Summary by CodeRabbit
Release Notes
Bug Fixes
Tests