-
Notifications
You must be signed in to change notification settings - Fork 570
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 pydantic deprecation warning #1837
Conversation
The documentation is not available anymore as the PR was closed or merged. |
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.
Cool!
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.
Ok thanks for the edit! The updated change looks good to me.
Thanks for the re-review :) |
Hey @Wauplin, can we expect this fix in the next version of hf__hub? This warning is polluting my shell :(
I know its already on main so I built it from source and it did remove the warning (thanks for that).
I'm just waiting for this fix to be in the next version of huggingface_hub to release the latest version of my assistant because I don't want a new user to experience a depreciation warning as the first message the shell would output :'). EDIT: I guess I asked the wrong question... if its already on main it will be in the next version... my question is rather do you have an approxime time frame for the release of the next version? |
Yes indeed that's the real question! 😄 |
Fix #1836.
In pydantic >= 2.0,
@validator
has been replaced by@field_validator
with a deprecation warning (until pydantic 3.x). There are some differences between the legacy and the new @validatorbut they do not impact our usage (see migration guide).. For now let's silent the warning and we'll update when (and if) we want to add support for pydantic v3.x in the future.Thanks @mattf for the heads up!
EDIT: converting to draft.
EDIT 2: reworked the PR to use same logic as currently on
main
and silent the warning. We'll reassess if and when pydantic v3.x is out.