-
Notifications
You must be signed in to change notification settings - Fork 715
fix: --kv-event-config now respects command line #2627
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughIntroduces create_kv_events_config to centralize KV events config creation for prefix caching. overwrite_args now conditionally sets kv_events_config based on this helper, respecting user-provided configs. Maintains existing kv_transfer_config handling and adds targeted logging for default vs user-specified KV events configuration. Changes
Sequence Diagram(s)sequenceDiagram
participant UserConfig as User Config
participant Overwrite as overwrite_args
participant Helper as create_kv_events_config
participant Logger as Logger
UserConfig->>Overwrite: Provide Config (prefix caching on/off, kv_events_config?)
Overwrite->>Helper: create_kv_events_config(config)
alt prefix caching disabled OR user provided kv_events_config
Helper-->>Overwrite: None
Overwrite->>Logger: Note user-provided or disabled (no defaults applied)
else prefix caching enabled and no user config
Helper-->>Overwrite: KVEventsConfig(enable=True, publisher="zmq", endpoint="tcp://*:{kv_port - dp_rank}")
Overwrite->>Logger: Note Dynamo default KV events config created
Overwrite->>Overwrite: Set defaults["kv_events_config"] = returned config
end
Overwrite->>Overwrite: Handle kv_transfer_config via existing helper (unchanged)
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
Status, Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
components/backends/vllm/src/dynamo/vllm/args.py (1)
274-275: dp_rank offset remains necessary for ZmqEventPublisher endpoint
- vLLM’s ZmqEventPublisher binds to the exact port specified in its
endpointparameter—it does not auto-increment or offset the port bydata_parallel_rank(docs.vllm.ai).- Therefore, subtracting (or otherwise offsetting)
dp_rankfrom your base port is required whenever you launch multiple data-parallel ranks on the same host to avoid binding conflicts.Recommended update:
- endpoint=f"tcp://*:{config.kv_port - dp_rank}", # vLLM will iterate dp_rank for us, so we need to subtract it out TODO: fix in vLLM + endpoint=f"tcp://*:{config.kv_port - dp_rank}", # offset port by dp_rank to allow multiple DP ranks on one host; vLLM uses the endpoint as-is
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
components/backends/vllm/src/dynamo/vllm/args.py(2 hunks)
🔇 Additional comments (3)
components/backends/vllm/src/dynamo/vllm/args.py (3)
263-267: Respects user-provided --kv-event-config (good behavior change).Line 264 correctly short-circuits when a user supplies kv_events_config, so we no longer overwrite CLI intent. This aligns with the PR objective.
340-347: Conditional defaults now honor CLI intent.Only setting defaults["kv_events_config"] when the helper returns a value ensures we don’t override a user-specified --kv-event-config. This achieves the PR’s stated goal.
340-347: I’m inspecting the implementation ofcreate_kv_events_configto confirm its default‐injection logic. Once I’ve verified the port math (base =kv_port - dp_rank) and CLI override behavior, I’ll finalize the test recommendation.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Alec <[email protected]>
ebc92ef to
1949a4f
Compare
Signed-off-by: Hannah Zhang <[email protected]>
Signed-off-by: Krishnan Prashanth <[email protected]>
Signed-off-by: nnshah1 <[email protected]>
Overview:
Previously, we would always set a default for the --kv-event-config to publish events when kv caching was enabled in dynamo. We now will let a user override our default.
Details:
Where should the reviewer start?
Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)
Summary by CodeRabbit