Skip to content

Commit 1e6210a

Browse files
speedstorm1copybara-github
authored andcommitted
chore: make final updates to include Ray v2.33.0 support on SDK, make 2.33.0 the default Ray version over 2.9.3
PiperOrigin-RevId: 674336228
1 parent 94ebf9f commit 1e6210a

8 files changed

Lines changed: 159 additions & 55 deletions

File tree

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Run unit tests for Ray 2.33.0 on Python 3.10
4+
env_vars: {
5+
key: "NOX_SESSION"
6+
value: "unit_ray(ray='2.33.0')"
7+
}
8+
9+
# Run unit tests in parallel, splitting up by file
10+
env_vars: {
11+
key: "PYTEST_ADDOPTS"
12+
value: "-n=auto --dist=loadscope"
13+
}

google/cloud/aiplatform/vertex_ray/cluster_init.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
def create_ray_cluster(
5353
head_node_type: Optional[resources.Resources] = resources.Resources(),
5454
python_version: Optional[str] = "3.10",
55-
ray_version: Optional[str] = "2.9",
55+
ray_version: Optional[str] = "2.33",
5656
network: Optional[str] = None,
5757
service_account: Optional[str] = None,
5858
cluster_name: Optional[str] = None,
@@ -106,7 +106,7 @@ def create_ray_cluster(
106106
head_node_type: The head node resource. Resources.node_count must be 1.
107107
If not set, default value of Resources() class will be used.
108108
python_version: Python version for the ray cluster.
109-
ray_version: Ray version for the ray cluster.
109+
ray_version: Ray version for the ray cluster. Default is 2.33.0.
110110
network: Virtual private cloud (VPC) network. For Ray Client, VPC
111111
peering is required to connect to the Ray Cluster managed in the
112112
Vertex API service. For Ray Job API, VPC network is not required
@@ -157,7 +157,7 @@ def create_ray_cluster(
157157
local_ray_verion = _validation_utils.get_local_ray_version()
158158
if ray_version != local_ray_verion:
159159
if custom_images is None and head_node_type.custom_image is None:
160-
install_ray_version = "2.9.3"
160+
install_ray_version = "2.33.0"
161161
logging.info(
162162
"[Ray on Vertex]: Local runtime has Ray version %s"
163163
", but the requested cluster runtime has %s. Please "

google/cloud/aiplatform/vertex_ray/util/resources.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,14 @@ class Resources:
6767

6868
@dataclasses.dataclass
6969
class NodeImages:
70-
"""
71-
Custom images for a ray cluster. We currently support Ray v2.9 and python v3.10.
70+
"""Custom images for a ray cluster.
71+
72+
We currently support Ray v2.9 and v2.33 and python v3.10.
7273
The custom images must be extended from the following base images:
73-
"{region}-docker.pkg.dev/vertex-ai/training/ray-cpu.2-9.py310:latest" or
74-
"{region}-docker.pkg.dev/vertex-ai/training/ray-gpu.2-9.py310:latest". In
74+
"{region}-docker.pkg.dev/vertex-ai/training/ray-cpu.2-9.py310:latest",
75+
"{region}-docker.pkg.dev/vertex-ai/training/ray-gpu.2-9.py310:latest",
76+
"{region}-docker.pkg.dev/vertex-ai/training/ray-cpu.2-33.py310:latest", or
77+
"{region}-docker.pkg.dev/vertex-ai/training/ray-gpu.2-33.py310:latest". In
7578
order to use custom images, need to specify both head and worker images.
7679
7780
Attributes:

noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ def unit_genai_minimal_dependencies(session):
249249

250250

251251
@nox.session(python="3.10")
252-
@nox.parametrize("ray", ["2.9.3"])
252+
@nox.parametrize("ray", ["2.9.3", "2.33.0"])
253253
def unit_ray(session, ray):
254254
# Install all test dependencies, then install this package in-place.
255255

testing/constraints-ray-2.33.0.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
ray==2.33.0
2+
# Below constraints are inherited from constraints-3.10.txt
3+
google-api-core
4+
proto-plus==1.22.3
5+
protobuf
6+
mock==4.0.2
7+
google-cloud-storage==2.2.1 # Increased for kfp 2.0 compatibility
8+
packaging==20.0 # Increased for compatibility with MLFlow
9+
grpcio-testing==1.34.0
10+
mlflow==1.30.1 # Pinned to speed up installation
11+
pytest-xdist==3.3.1 # Pinned to unbreak unit tests
12+
IPython # Added to test supernova rich html buttons
13+

0 commit comments

Comments
 (0)