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

Limit to pydantic<2.x on python3.8 #1828

Merged
merged 4 commits into from
Nov 15, 2023
Merged

Conversation

Wauplin
Copy link
Contributor

@Wauplin Wauplin commented Nov 15, 2023

Since we allowed pydantic>=2.x in v0.19.0 release, we got some issues in the CI. The problem comes from the fact that on Python3.8, Pydantic>=2.x and tensorflow don't seem to be compatible. Tensorflow depends on typing_extension<=4.5.0 while pydantic 2.x requires typing_extensions>=4.6. This causes a ImportError: cannot import name 'TypeAliasType' from 'typing_extensions'.

Examples of failed CIs:


My plan is to make a new patch release 0.19.3 if that works since it's a bit of a regression right now (compared to huggingface_hub 0.18).

EDIT: adding related slack convo (internal)

EDIT 2: I made some cleaning in the keras integration and especially the tests (see 079cc54). I kept it iso-feature so that I can still cherry-pick it for a release. We might want to do a more in-depth review of the keras integration at some point but that's not the goal of this PR.

@Wauplin Wauplin marked this pull request as ready for review November 15, 2023 14:06
@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Nov 15, 2023

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

Copy link
Member

@LysandreJik LysandreJik left a comment

Choose a reason for hiding this comment

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

Ok! Annoying requirement from tensorflow

@Wauplin
Copy link
Contributor Author

Wauplin commented Nov 15, 2023

Thanks for the quick review! Failing tests are unrelated. I'll merge and make the hot fix release.

@Wauplin Wauplin merged commit 256a191 into main Nov 15, 2023
13 of 16 checks passed
@Wauplin Wauplin deleted the fix-typing-extension-dependency-issue branch November 15, 2023 14:52
Wauplin added a commit that referenced this pull request Nov 15, 2023
* limit pydantic version on python3.8 to 1.x

* fix

* fix comma

* light fix/refacto for keras tests
@Wauplin
Copy link
Contributor Author

Wauplin commented Nov 15, 2023

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.

None yet

3 participants