-
Notifications
You must be signed in to change notification settings - Fork 5
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
Plan to support pydantic 2.x versions #187
Comments
Hi @sjsinghai — this is something we'd investigated a couple months ago, but ran into severe performance issues with at that time (things that were sub-second suddenly took minutes). We'd also like to make the move, but not at the cost of slowing down the SDK by the amount we observed... Curious: what particular features are you most looking forward to adopting or are reliant on with pydantic v2.x? Perhaps even if we're still unable to move to pydantic 2.x we can look at some other way of unlocking those needs. |
That is a bit surpirsing given that the main thrust of pydantic 2.x is speed up offered by the improved backend. In fact it is because of the promised speed-up that we are investigation move of our stack to 2.x. Have you considered using the pydantic.v1 that ships with 2.x e.g. as documented here? This should
|
Here's the thread over on pydantic's repo — seems at least one other adopter has faced similar challenges: pydantic/pydantic#7263 |
Agree we need that as well. I sent a mail to Atlan support. The migration is pretty smooth to do, we did in our repo |
We're looking at this again — we definitely want to get there, too! |
We're making more progress on this now than we had previously, but still some work to do. However, to give an update on our direction:
A bit more context: We had hoped to move to "pure" Pydantic V2 ourselves, but the performance hit is simply unacceptable. We have proven this by:
First we tested with importing straight from Result: 35 seconds on average to go through the imports, model rebuilds, and class instantiations. ❌ Next, we took exactly the same code but replaced the import straight from Result: 0.8 seconds on average to go through the imports, forward ref updates, and class instantiations. ✅ Given this is only a subset of our model, we expect the performance degradation of "pure" V2 to be even worse with the full complexity of our model (likely growing from 35x slower to close to 100x slower or more), and thus will stick to the V1 API for the foreseeable future, though we do intend to update to v2 of the library itself. |
Yes. That sounds like a right approach without having to swallow v2 in one shot. And will help us a lot in the short term @cmgrote. |
When can we expect support for pydantic 2.x versions?
The text was updated successfully, but these errors were encountered: