-
-
Notifications
You must be signed in to change notification settings - Fork 11.3k
[P/D] Add a shutdown method to the Connector API #22699
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
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 introduces a shutdown method to the KVConnector API, aimed at ensuring proper resource cleanup during shutdown. The implementation registers this new method with Python's atexit module to be called on process exit. While this addresses the need for cleanup, relying on atexit can be unreliable in some scenarios and may cause issues in complex applications. My review highlights this potential issue and suggests integrating the shutdown logic into vLLM's existing explicit shutdown sequence for better robustness.
|
👋 Hi! Thank you for contributing to the vLLM project. 💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels. Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging. To run CI, PR reviewers can either: Add 🚀 |
ed8426a to
5790ef1
Compare
ddb1152 to
920ba0f
Compare
|
/cc @njhill PTAL |
fba851e to
25974c6
Compare
KuntaiDu
left a comment
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.
LGTM, but also we need to let @njhill take a look.
25974c6 to
344e254
Compare
344e254 to
4624fd0
Compare
|
@NickLucche PTAL. |
2712f6f to
333c2e2
Compare
NickLucche
left a comment
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.
looking cleaner thanks!
|
@KuntaiDu will diff connector like LMCache need to implement their own shutdown()? |
njhill
left a comment
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.
Thanks @chaunceyjiang, please see inline comments.
In addition I think we also need to call the executor shutdown method from EngineCore.shutdown() in core.py.
@panpan0000 they don't need to but can do if it makes sense. |
|
@chaunceyjiang another missing link is that the multiproc worker proc should call What might be better there instead of calling |
505db0f to
ce02dcc
Compare
Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
49c605e to
44b8b43
Compare
Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
njhill
left a comment
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.
Thanks @chaunceyjiang
Hi @DarkLight1337, Could you please help re-run the e2e test? |
Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com> Signed-off-by: xuebwang-amd <xuebwang@amd.com>
Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com> Signed-off-by: xuebwang-amd <xuebwang@amd.com>
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.FIX #22638 (comment)
Purpose
For some PD Connectors, it is necessary to perform certain cleanup actions, such as closing connections, when shutting down D.
Test Plan
Test Result
(Optional) Documentation Update