-
-
Notifications
You must be signed in to change notification settings - Fork 5k
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
[BugFix] Fix server crash on empty prompt #7746
[BugFix] Fix server crash on empty prompt #7746
Conversation
This avoids a async loop crash that takes down the server Signed-off-by: Max de Bayser <mbayser@br.ibm.com>
👋 Hi! Thank you for contributing to the vLLM project. Once the PR is approved and ready to go, please make sure to run full CI as it is required to merge (or just use auto-merge). To run full CI, you can do one of these:
🚀 |
Let's perform the check inside |
Validate the that the input prompts aren't empty This avoids an async loop crash that takes down the server Signed-off-by: Max de Bayser <mbayser@br.ibm.com> Signed-off-by: Jefferson Fialho <jfialho@ibm.com>
@maxdebayser could you add a simple test for this too? |
Also add unit tests for LLM and OpenAI entrypoints Signed-off-by: Max de Bayser <mbayser@br.ibm.com>
I've added the tests and moved the validation as requested. |
Signed-off-by: Max de Bayser <mbayser@br.ibm.com>
Signed-off-by: Max de Bayser <mbayser@br.ibm.com>
Signed-off-by: Max de Bayser <mbayser@br.ibm.com>
Signed-off-by: Max de Bayser <mbayser@br.ibm.com>
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 @maxdebayser!
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.
Just noticed additional simplification
Signed-off-by: Max de Bayser <mbayser@br.ibm.com>
Tested in local machines. Have assertiona failed on server side which causes the vllm worker to crash. This may be caused by sending empty prompt to the server as described in vllm-project/vllm#7632 and vllm-project/vllm#7746. Need to further inspection on this later.
Signed-off-by: Max de Bayser <mbayser@br.ibm.com> Signed-off-by: Alvant <alvasian@yandex.ru>
Signed-off-by: Max de Bayser <mbayser@br.ibm.com>
Fixes #7632
To reproduce, start the server with
python -m vllm.entrypoints.openai.api_server --model gpt2
and send an empty prompt:On the server side this log will show and the server will be dead:
After the fix, an error 400 is returned: