-
Notifications
You must be signed in to change notification settings - Fork 75
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
Update to pydantic 2 #667
Update to pydantic 2 #667
Conversation
i've been reading some stories like this. just a heads up |
@amiruci eThanks for the heads up -- I think as long as it works for our project, i think it's fine. Truss will be becoming just a CLI (and installed via |
I don't think it makes sense to bump the versions in |
That's fair. How about this -- to solve the circular dependency w/ the control server, I can do the following:
|
Dropping this in favor of this plan: https://www.notion.so/ml-infra/Use-of-pydantic-in-Truss-7b76357bf39d47efa11cdb5212eb6ca8?pvs=4 |
Why Pydantic 2?
Pydantic 1 -> 2 upgrade has some serious breaking changes, that have been a big pain for a lot of OSS developers.
The main motivating factor for us updating the version now is that we are going to start using more Pydantic stuff in Truss (particularly around the
TrussConfig
). We don't want to have to do a migration at some point, so now feels like a good time to make this change.As a sidenote -- we are already getting complaints from customers that they cannot install
truss
because it currently depends on pydantic 1.Impact
It's possible that this will create a new set of customers that cannot install Truss from pypi, which is my biggest worry here. I think there are two main mitigations:
Alternatives
Supporting both versions of Pydantic
This is a lot of work for us right now for what we are doing.
Notes on implementation
Note that in this branch I don't touch the versions for truss-server or the control-server. The main thing that this impacts is the context builder (and of course, the CLI). Those changes we'll do in a follow-up. It's complicated, because to update fastapi on the control server, we need to have a Truss release first! (the control server depends on Truss).
Testing
I tested building a model on dev, and it seemed to work.
Supporting