-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Fix the pydantic logging validator #12420
base: main
Are you sure you want to change the base?
Conversation
Prevent the validator from logging unused extra fields before object is validated by the pydantic validator. During the routing based on the request content where pydantic tries several classes for deserialization, this would result in spurious logs. Signed-off-by: Max de Bayser <[email protected]>
👋 Hi! Thank you for contributing to the vLLM project. 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 do one of these:
🚀 |
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 for fixing! Also cc @mgoin
Hmm, looks like this is causing a bunch of tests to fail. For example:
|
Prevent the validator from logging unused extra fields before object is validated by the pydantic validator.
During the routing based on the request content where pydantic tries several classes for deserialization, this would result in spurious logs.
For example, during in a request like this one:
vLLM would log
This is because pydantic tries to deserialize the JSON either as an
EmbeddingCompletionRequest
or anEmbeddingChatRequest
. During the validation of theEmbeddingChatRequest
it shows this log because the field only exists inEmbeddingCompletionRequest
. This could lead users to believe that theinput
field was ignored while processing the request.cc: @DarkLight1337 , @njhill (since you touched this code recently)