-
Notifications
You must be signed in to change notification settings - Fork 433
[BugFix] Adapt mooncake_connector_v1 to latest vllm #1080
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
base: main
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @ZeldaHuang, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request implements necessary bug fixes to adapt the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request aims to adapt mooncake_connector_v1.py for compatibility with the latest vllm release. The changes primarily involve updating import paths and adjusting to API modifications in vllm. While most of the adaptations seem correct, I've identified a critical issue in the handling of the attention backend enum that would lead to a runtime error during initialization. My review provides a specific code suggestion to resolve this problem.
| attn_backend = backend_name_to_enum(self.backend_name) | ||
| self._use_flashinfer = attn_backend == _Backend.FLASHINFER_VLLM_V1 | ||
| self._use_pallas_v1 = attn_backend == _Backend.PALLAS_VLLM_V1 | ||
| attn_backend = AttentionBackendEnum[self.backend_name] |
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.
The current implementation AttentionBackendEnum[self.backend_name] attempts to access an enum member by its name. However, self.backend_name (e.g., 'flashinfer') is the value of the enum member, not its name (e.g., 'FLASHINFER'). This will cause a KeyError at runtime, preventing the worker from initializing.
To correctly get the enum member from its value, you should call the enum as a function: AttentionBackendEnum(self.backend_name).
| attn_backend = AttentionBackendEnum[self.backend_name] | |
| attn_backend = AttentionBackendEnum(self.backend_name) |
|
Can we introduce something like version check to switch? |
|
@dtcccc Maintaining mooncake_connector_v1 in vllm repo is a better way to keep compatibility, Will this PR be merged? vllm-project/vllm#24718. Or can we use mooncake-transfer-engine as a nixl plugin in nixl connector? |
We are currently working on this. |
|
We should maintain version compatibility—maybe using runtime if checks in the code? If that’s not feasible, it’s fine, but if vLLM already has a stable release (e.g., v0.11.0), we need to document the minimum required version clearly. |
Sure. Could you provide a stable version? So we can update the document. @ZeldaHuang |
|
@stmatengss I have tested 1P1D |
Should we keep both connectors? The current one supports v0.11.1/2, while the old one supports v0.11.0. Or this PR can support v0.11.0/1/2. |
Description
Adapt
mooncake_connector_v1.pyto vllm v0.11.1 (latest release)Type of Change
How Has This Been Tested?
Checklist