-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
Make Ray compatible with pydantic>=2.5.0
#40451
Conversation
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(seems @can-anyscale is going to review this one)
FYI to reviewers: this is a WIP, I won't merge it until after the next |
do you have a link for this? will that mean that this PR will have to require |
@ddelange here's the link to the Pydantic issue: pydantic/pydantic#6763 After that is merged and released, we will require either |
Signed-off-by: Shreyas Krishnaswamy <shrekris@anyscale.com>
Signed-off-by: Shreyas Krishnaswamy <shrekris@anyscale.com>
Signed-off-by: Shreyas Krishnaswamy <shrekris@anyscale.com>
python/requirements.txt
Outdated
@@ -58,6 +58,6 @@ starlette | |||
typer | |||
fsspec | |||
pandas>=1.3 | |||
pydantic<2 | |||
pydantic!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,<3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
=2.5.0,<3 doesn't work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That works, but we want to allow users to use pydantic<2
for Serve, so no need to pin it to 2.5.0
explicitly for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a comment to this effect?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I added one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stamping for setup.py changes
Signed-off-by: Shreyas Krishnaswamy <shrekris@anyscale.com>
@architkulkarni This change is ready to merge. |
@shrekris-anyscale Looks like premerge is still running, please let me know again when it's ready |
@architkulkarni Premerge passed. This PR is ready to merge. |
This change makes Ray compatible with pydantic>=2.5.0. It makes all Ray unit tests use pydantic==2.5.0. It also adds a test suite to check that Ray Serve works with pydantic<2. Additional Changes: This PR also updates the following packages: mypy: 0.982 -> 1.7.0 deepspeed: 0.8.3 -> 0.12.3 Follow-up: We need to make a follow-up PR that makes Ray release tests run with pydantic>=2.5.0. --------- Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com> Signed-off-by: Shreyas Krishnaswamy <shrekris@anyscale.com> Co-authored-by: Shreyas Krishnaswamy <shrekris@anyscale.com> Signed-off-by: Xiaoshuang Liu <lxsbit@126.com>
As a follow-up to #40451, this change makes all the Ray release tests use pydantic>=2.5.0. Additional changes: The linter now uses mypy==1.7.0. All Ray release tests, including workspace templates, now use deepspeed>=0.12.3. This change fix the serve_resnet_benchmark.py release test, which is broken on master. --------- Signed-off-by: can <can@anyscale.com> Signed-off-by: Shreyas Krishnaswamy <shrekris@anyscale.com> Co-authored-by: Shreyas Krishnaswamy <shrekris@anyscale.com>
Happy to see this merged, thanks for pushing it forward @shrekris-anyscale |
This change makes Ray compatible with pydantic>=2.5.0. It makes all Ray unit tests use pydantic==2.5.0. It also adds a test suite to check that Ray Serve works with pydantic<2. Additional Changes: This PR also updates the following packages: mypy: 0.982 -> 1.7.0 deepspeed: 0.8.3 -> 0.12.3 Follow-up: We need to make a follow-up PR that makes Ray release tests run with pydantic>=2.5.0. --------- Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com> Signed-off-by: Shreyas Krishnaswamy <shrekris@anyscale.com> Co-authored-by: Shreyas Krishnaswamy <shrekris@anyscale.com>
As a follow-up to ray-project#40451, this change makes all the Ray release tests use pydantic>=2.5.0. Additional changes: The linter now uses mypy==1.7.0. All Ray release tests, including workspace templates, now use deepspeed>=0.12.3. This change fix the serve_resnet_benchmark.py release test, which is broken on master. --------- Signed-off-by: can <can@anyscale.com> Signed-off-by: Shreyas Krishnaswamy <shrekris@anyscale.com> Co-authored-by: Shreyas Krishnaswamy <shrekris@anyscale.com>
This is a follow-up to where the Pydantic v1 shim was added [1]. It's inspired by Ray's approach [2]. This locks the version in the CI and I think that's okay since we don't need to keep on updating them, as they're intended as smoke tests. [1] #882 (comment) [2] ray-project/ray#40451
This is a follow-up to where the Pydantic v1 shim was added [1]. It's inspired by Ray's approach [2]. This locks the version in the CI and I think that's okay since we don't need to keep on updating them, as they're intended as smoke tests. [1] #882 (comment) [2] ray-project/ray#40451
* test: Add Pydantic version to matrix variable This is a follow-up to where the Pydantic v1 shim was added [1]. It's inspired by Ray's approach [2]. This locks the version in the CI and I think that's okay since we don't need to keep on updating them, as they're intended as smoke tests. [1] #882 (comment) [2] ray-project/ray#40451 * build: Formatting
Why are these changes needed?
This change makes Ray compatible with
pydantic>=2.5.0
. It makes all Ray unit tests usepydantic==2.5.0
. It also adds a test suite to check that Ray Serve works withpydantic<2
.Additional Changes:
mypy
:0.982
->1.7.0
deepspeed
:0.8.3
->0.12.3
Follow-up:
pydantic>=2.5.0
.Related issue number
Addresses:
pydantic>=2.0
#37372Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.