Skip to content

Conversation

alanwguo
Copy link
Contributor

Cherry-pick of #37055
These changes fixes a couple of things when ray and pydantic 2.0 is installed:

ray can start up now
ray jobs works now
gets rid of some deprecation warnings when using old pydantic field names. Some things are still broken:

ray serve doesn't work because it depends on fastapi and fastapi does not support pydantic 2.0 yet: Prepare for Pydantic V2 release fastapi/fastapi#6051 Pickling pydantic 2 models is not possible, although users can still pickle pydantic 1.0 models via the compatibility pydantic.v1 import.

Why are these changes needed?

Related issue number

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

These changes fixes a couple of things when ray and pydantic 2.0 is installed:

ray can start up now
ray jobs works now
gets rid of some deprecation warnings when using old pydantic field names.
Some things are still broken:

ray serve doesn't work because it depends on fastapi and fastapi does not support pydantic 2.0 yet: Prepare for Pydantic V2 release fastapi/fastapi#6051
Pickling pydantic 2 models is not possible, although users can still pickle pydantic 1.0 models via the compatibility pydantic.v1 import.
@alanwguo alanwguo added release-blocker P0 Issue that blocks the release v2.6.0-pick labels Jul 17, 2023
@can-anyscale can-anyscale merged commit 6209bb4 into ray-project:releases/2.6.0 Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-blocker P0 Issue that blocks the release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants