- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 11k
 
Add workaround for shared field_names in pydantic model class #13925
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
Add workaround for shared field_names in pydantic model class #13925
Conversation
Signed-off-by: Max de Bayser <mbayser@br.ibm.com>
| 
           👋 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  🚀  | 
    
Signed-off-by: Max de Bayser <mbayser@br.ibm.com>
Signed-off-by: Max de Bayser <mbayser@br.ibm.com>
| 
           @maxdebayser Is this PR still being merged in? I'm seeing the same warning in the latest version as well  | 
    
| 
           @vrdn-23 , no it wasn't.  | 
    
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.
The tests pass now so it should be fine to merge, sorry for forgetting about this!
…roject#13925) Signed-off-by: Max de Bayser <mbayser@br.ibm.com> Signed-off-by: Wes Medford <wryanmedford@gmail.com>
…roject#13925) Signed-off-by: Max de Bayser <mbayser@br.ibm.com> Signed-off-by: Louis Ulmer <ulmerlouis@gmail.com>
…roject#13925) Signed-off-by: Max de Bayser <mbayser@br.ibm.com>
…roject#13925) Signed-off-by: Max de Bayser <mbayser@br.ibm.com>
…roject#13925) Signed-off-by: Max de Bayser <mbayser@br.ibm.com> Signed-off-by: Mu Huai <tianbowen.tbw@antgroup.com>
FIX #13880
FIX #13881
In the code below,
field_namesend up being shared by different classes when they are related by inheritance, in this case:ChatCompletionLogProbsContent(ChatCompletionLogProb). Since the cache is built only once, if the first model that is validated comes from the super class, the cache will be wrong for the derived class from then on. Redefining thefield_namesseems to prevent this from happening. Another way is to break up the inheritance and add all fields from ChatCompletionLogProb in ChatCompletionLogProbsContent.cc: @njhill