Hi everyone! 👋
We want to expand our argument validation in transformers to improve the library's overall UX. No one wants to store a config object on the Hub with impossible parameterization or go through the code to find the admissible range for a certain input argument.
To that end, we're considering adding pydantic>=2.0 as a base requirement to 🤗 transformers.
Adding a base requirement is not a decision we want to make lightly -- it may place unwanted constraints on downstream projects. We can't anticipate all issues, so we're raising this issue to proactively find them. If >2.0 is a general issue, we can do a try/except block with import pydantic.v1 as pydantic, and use 1.x syntax.
Let us know your opinion about pydantic!
(Related PR: #35910)
Hi everyone! 👋
We want to expand our argument validation in
transformersto improve the library's overall UX. No one wants to store a config object on the Hub with impossible parameterization or go through the code to find the admissible range for a certain input argument.To that end, we're considering adding
pydantic>=2.0as a base requirement to 🤗transformers.Adding a base requirement is not a decision we want to make lightly -- it may place unwanted constraints on downstream projects. We can't anticipate all issues, so we're raising this issue to proactively find them. If
>2.0is a general issue, we can do a try/except block withimport pydantic.v1 as pydantic, and use1.xsyntax.Let us know your opinion about
pydantic!(Related PR: #35910)