-
Notifications
You must be signed in to change notification settings - Fork 9
[bugfix] Update server type checks for merged PD instances #65
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
f5536d7 to
2ecfc76
Compare
lm_service/apis/vllm/proxy.py
Outdated
|
|
||
| for server_type in SERVER_PARAMS_MAP: | ||
| if (self.is_pd_merged and server_type == ServerType.P_INSTANCE) or ( | ||
| if ( |
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.
能不能写个active_map,或者优化一下if判断
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.
fixed
2ecfc76 to
18a31a1
Compare
| self.is_pd_merged = self.metastore_client.is_pd_merged | ||
| init_params = locals() | ||
| for server_type in SERVER_PARAMS_MAP: | ||
| if (self.is_pd_merged and server_type == ServerType.P_INSTANCE) or ( |
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.
为什么只改一部分?
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.
Fixed
18a31a1 to
8c8bd0e
Compare
lm_service/apis/vllm/proxy.py
Outdated
| not self.is_pd_merged and server_type == ServerType.PD_INSTANCE | ||
| ): | ||
| continue | ||
| active_server_types = [ServerType.E_INSTANCE] + ( |
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.
能不能提取个公共的参数?self.active_server_types避免多次遍历
Expanded the condition to skip both P_INSTANCE and D_INSTANCE when is_pd_merged is True, ensuring correct server type handling in the Proxy class. Signed-off-by: John Liu BUAA <[email protected]>
8c8bd0e to
f29aa97
Compare
This pull request refactors the logic for initializing server clusters in
lm_service/apis/vllm/proxy.pyto improve clarity and correctness when handling different server types based on theis_pd_mergedflag. The changes streamline which server types are initialized and adjust the conditions for skipping certain types.Cluster initialization logic improvements:
_init_cluster_with_addr_listto explicitly construct the list of active server types based on theis_pd_mergedflag, replacing the previous loop and conditional logic for skipping server types._init_cluster_with_metastoreto skip bothP_INSTANCEandD_INSTANCEwhenis_pd_mergedis true, ensuring only relevant server types are initialized.