KVOutputAggregator: Fix handling of empty output#22899
KVOutputAggregator: Fix handling of empty output#22899orozery wants to merge 0 commit intovllm-project:mainfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request correctly fixes a critical AttributeError in KVOutputAggregator when kv_connector_output is None. The added check is a good solution. However, I found another critical issue in the same aggregate method: it will crash with an IndexError if the input outputs list is empty. This can occur if async_aggregate receives an empty list of futures. Since the goal is to handle empty outputs robustly, I strongly recommend adding a check for an empty outputs list at the start of the aggregate method. As this is outside the changed lines, I'm mentioning it in this general feedback.
|
👋 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 🚀 |
0e14e86 to
540d54c
Compare
|
Already fixed in #22663 |
This PR fixes KVOutputAggregator to correctly handle the case where ModelRunnerOutput.kv_connector_output is None.
Example trace of bug when loading a single request from KV connector, which yields
EmptyModelRunnerOutputfor a couple of engine steps: