Skip to content
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

Supporting pydantic<3 #1727

Merged
merged 3 commits into from
Oct 13, 2023
Merged

Supporting pydantic<3 #1727

merged 3 commits into from
Oct 13, 2023

Conversation

jamesbraza
Copy link
Contributor

@jamesbraza jamesbraza commented Oct 12, 2023

Closes #1726

I manually and locally tested with pydantic v2 using Python 3.11.4:

> pip install -e .[testing]
> pip list | grep pydantic
pydantic                  2.4.2
pydantic_core             2.10.1
> pytest tests/test_inference*.py
...
83 passed, 6 skipped, 16 warnings in 5.73s

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Oct 12, 2023

The documentation is not available anymore as the PR was closed or merged.

@jamesbraza
Copy link
Contributor Author

jamesbraza commented Oct 12, 2023

Damn it didn't just work 🥲

Edit: linked two other PRs that should enable compatibility

@Wauplin
Copy link
Contributor

Wauplin commented Oct 13, 2023

Both PRs are now merged and I updated this PR to latest changes. Let's see if CI is happy now! 😄

Copy link
Contributor

@Wauplin Wauplin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Made some local tests as well and both versions seem to be fully supported! Thanks for taking care of it @jamesbraza 🚀

@Wauplin Wauplin merged commit 0cf0c9f into huggingface:main Oct 13, 2023
@jamesbraza jamesbraza deleted the pydantic-v2 branch October 13, 2023 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Request: bumping inference extra to pydantic v2
3 participants