-
Notifications
You must be signed in to change notification settings - Fork 16.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
community[patch]: Update Embeddings root_validators #23295
community[patch]: Update Embeddings root_validators #23295
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
@eyurtsev cc |
@@ -91,16 +96,25 @@ def validate_environment(cls, values: Dict) -> Dict: | |||
try: | |||
import qianfan | |||
|
|||
default_values = { | |||
name: field.default | |||
for name, field in cls.__fields__.items() |
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.
Let's hold off on doing this in more places since it also introduces incompatibility with pydantic 1
I'm exploring resolving this using a decorator that automatically populates defaults: #23841
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.
Okay, then I'll close this pr.
@maang-h merged the other PR! Going to close this one! Again thanks so much for helping out with this. (We may still need to do this work in the future to get rid of the custom decorator, but for now this paves the way to try and do the pydantic 2 migration.) |
i see. |
This PR updates root validators for:
Issues: #22819