-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
[ray serve] incompatibility with pydantic >=2.0 #39722
Comments
Hey @Yangqing thanks a bunch for reporting! We'll take a close look. |
We are currently also struggeling with this, because parts of our code already use |
This also breaks compatibility with the dashboard too |
Could you give more details? What errors are you seeing? |
You can’t install dashboards if you are using pydantic >2
(I’m using poetry)
…On Tue, Sep 26, 2023 at 17:35 shrekris-anyscale ***@***.***> wrote:
This also breaks compatibility with the dashboard too
Could you give more details? What errors are you seeing?
—
Reply to this email directly, view it on GitHub
<#39722 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFZTGC2U27DAHE75H3MFVTX4NYEPANCNFSM6AAAAAA44CIBSY>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Chiming in that we had to backport our application to pydantic v1.10 to work with ray data. |
Same issue here. I'm forced to stay on Pydantic 1.x because of Ray and it's hard to work with with FastAPI |
Also encountering compatibility challenges that necessitate remaining on Pydantic v1 to ensure functionality with Ray Serve. Means i have to re-write a lot of Pydantic v2 code |
Also encountering compatibility challenges but when using vllm that uses ray to serve model. |
Hi folks, I am currently working with the Pydantic team to make this happen. The underlying issue blocking us is here: pydantic/pydantic#6763. I've merged fixes for this issue into |
With the recent release of pydantic 2.5 will you be able to unpin the dependency now? Thanks |
Yes, we're planning to unpin the dependency for Ray 2.9 (the next Ray release). |
Ok great, thanks, do you have a rough timeline on when that might be released? |
It'll likely be out mid-December. |
Ok, thank you. Might it be unpinned sooner in a nightly? |
Yes, it'll probably be unpinned in a nightly by the end of the month. |
ref #40451 |
We've merged the changes to make Ray compatible with Pydantic 2.5+. You can start using Pydantic 2.5+ with Ray 2.9, which should be out at the end of December. These changes should also be in the Ray nightly, so feel free to try them out! |
## Summary - upgrades to pydantic, torch, ray and agi-pack to support `pydantic>2.5` upgrade - Ray requires an upgrade to `2.9` for pydantic>2 update: ray-project/ray#39722 - Updated `agi-pack` with `pydantic>2` support: spillai/agi-pack#16 - various migration upgrades to ModelSpec and other dataclasses with new pydantic `field_validator` syntax ## Related issues #220 ## Checks - [x] `make lint`: I've run `make lint` to lint the changes in this PR. - [x] `make test`: I've made sure the tests (`make test-cpu` or `make test`) are passing. - Additional tests: - [x] Benchmark tests (when contributing new models) - [x] GPU/HW tests
What happened + What you expected to happen
Basically, I was trying to run the ray serve example code in the documentation with fastapi integration:
expecting it would work out of box. And it produces pydantic user error as follows:
I believe there is the general compatibility issue reported by others in e.g. #37372 and #37019, but just submitting this to signal the bug specifically wrt ray serve. Hope it is helpful!
Versions / Dependencies
ray: 2.6.3 (default one shipped in the anyscale platform)
pydantic: 2.3.0
Reproduction script
Do "pip install -U pydantic" to update to 2.x.
Then, run the example code at https://docs.ray.io/en/latest/serve/http-guide.html#fastapi-http-deployments
Issue Severity
None
The text was updated successfully, but these errors were encountered: