Skip to content

Conversation

@joerunde
Copy link
Collaborator

@joerunde joerunde commented Feb 11, 2025

This PR adds exception handling to the V0 engine that catches errors processing the input for a sequence group, and removes that sequence group from the current batch instead of crashing the entire engine. We see this a lot when processing invalid image data for multimodal models, the mllama models are particularly bad offenders.

With this change, users will receive a 400 instead of a 500 when their request fails input processing in the engine, and other running requests will continue to process instead of also receiving 500s.

Signed-off-by: Joe Runde <Joseph.Runde@ibm.com>
Signed-off-by: Joe Runde <Joseph.Runde@ibm.com>
Signed-off-by: Joe Runde <Joseph.Runde@ibm.com>
Signed-off-by: Joe Runde <Joseph.Runde@ibm.com>
@github-actions
Copy link

👋 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 fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of those by going to your fastcheck build on Buildkite UI (linked in the PR checks section) and unblock them. If you do not have permission to unblock, ping simon-mo or khluu to add you in our Buildkite org.

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 ready label to the PR or enable auto-merge.

🚀

Signed-off-by: Joe Runde <Joseph.Runde@ibm.com>
Signed-off-by: Joe Runde <Joseph.Runde@ibm.com>
Signed-off-by: Joe Runde <Joseph.Runde@ibm.com>
@joerunde joerunde added the ready ONLY add when PR is ready to merge/full CI is needed label Feb 17, 2025
Copy link
Member

@njhill njhill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @joerunde and sorry for taking so long to properly digest/review this.

Given the state of v0 code, this looks reasonable to me :)

Comment on lines 766 to 769
except Exception as e:
# Raise an exception that tracks the ID of the bad request
raise InputProcessingError(seq_group_metadata.request_id,
str(e)) from e
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about moving this try/except to the place where this method is called, here, so that it can contain that one line?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, that does sound like a better idea

@njhill
Copy link
Member

njhill commented Feb 25, 2025

Probably worth merging in latest main now anyhow, which will kick off all the tests again.

@joerunde
Copy link
Collaborator Author

Given the state of v0 code, this looks reasonable to me :)

Hah, reading that as: "This code may be rough but it's not worse than the surroundings"

@DarkLight1337 DarkLight1337 merged commit 3f808cc into vllm-project:main Feb 26, 2025
46 checks passed
Akshat-Tripathi pushed a commit to krai/vllm that referenced this pull request Mar 3, 2025
Signed-off-by: Joe Runde <Joseph.Runde@ibm.com>
lulmer pushed a commit to lulmer/vllm that referenced this pull request Apr 7, 2025
Signed-off-by: Joe Runde <Joseph.Runde@ibm.com>
Signed-off-by: Louis Ulmer <ulmerlouis@gmail.com>
shreyankg pushed a commit to shreyankg/vllm that referenced this pull request May 3, 2025
Signed-off-by: Joe Runde <Joseph.Runde@ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants