Skip to content
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

[Clusters] Cluster setup fails with pydantic 1.10.20 #49721

Open
georgeholt1 opened this issue Jan 8, 2025 · 0 comments
Open

[Clusters] Cluster setup fails with pydantic 1.10.20 #49721

georgeholt1 opened this issue Jan 8, 2025 · 0 comments
Labels
bug Something that is supposed to be working; but isn't clusters core Issues that should be addressed in Ray Core triage Needs triage (eg: priority, bug/not-bug, and owning component)

Comments

@georgeholt1
Copy link

What happened + What you expected to happen

Running ray up cluster-config.yaml fails when setting up a cluster on AWS.

Relevant part of the logs:

  [7/7] Starting the Ray runtime
Traceback (most recent call last):
  File "/home/ubuntu/aloha/.venv/bin/ray", line 5, in <module>
    from ray.scripts.scripts import main
  File "/home/ubuntu/aloha/.venv/lib/python3.12/site-packages/ray/scripts/scripts.py", line 2636, in <module>
    from ray.util.state.state_cli import (
  File "/home/ubuntu/aloha/.venv/lib/python3.12/site-packages/ray/util/state/__init__.py", line 1, in <module>
    from ray.util.state.api import (
  File "/home/ubuntu/aloha/.venv/lib/python3.12/site-packages/ray/util/state/api.py", line 18, in <module>
    from ray.util.state.common import (
  File "/home/ubuntu/aloha/.venv/lib/python3.12/site-packages/ray/util/state/common.py", line 944, in <module>
    @dataclass(init=not IS_PYDANTIC_2)
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "pydantic/dataclasses.py", line 232, in pydantic.dataclasses.dataclass.wrap
    float,
  File "pydantic/main.py", line 813, in pydantic.main.BaseModel.__try_update_forward_refs__
  File "pydantic/typing.py", line 566, in pydantic.typing.update_model_forward_refs
    raise TypeError(f"{self} is not subscriptable")
  File "pydantic/typing.py", line 532, in pydantic.typing.update_field_forward_refs
    class Any(metaclass=_AnyMeta):
  File "pydantic/typing.py", line 75, in pydantic.typing.evaluate_forwardref
    'Iterable',
TypeError: ForwardRef._evaluate() got an unexpected keyword argument 'type_params'

The cluster config I'm using is similar to the official example except I am not using the provided docker image. Instead, I am installing Ray and the dependencies myself. Part of the dependencies is pydantic<2 as recommended in the python requirements.txt file.

This has worked for the last few months until yesterday when pydantic 1.10.20 was released.

Setting pydantic=1.10.19 results in no issues when setting up the cluster.

Versions / Dependencies

ray 2.40.0
pydantic 1.10.20

Reproduction script

ray up cluster-config.yaml

Issue Severity

None

@georgeholt1 georgeholt1 added bug Something that is supposed to be working; but isn't triage Needs triage (eg: priority, bug/not-bug, and owning component) labels Jan 8, 2025
@jcotant1 jcotant1 added core Issues that should be addressed in Ray Core clusters labels Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that is supposed to be working; but isn't clusters core Issues that should be addressed in Ray Core triage Needs triage (eg: priority, bug/not-bug, and owning component)
Projects
None yet
Development

No branches or pull requests

2 participants