Skip to content

Commit fbb9560

Browse files
vertex-sdk-botcopybara-github
authored andcommitted
feat: Update Ray system tests to be compatible with new RoV 2.42 changes
PiperOrigin-RevId: 740827929
1 parent 19c69f4 commit fbb9560

File tree

3 files changed

+30
-8
lines changed

3 files changed

+30
-8
lines changed

tests/system/vertex_ray/test_cluster_management.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22

3-
# Copyright 2023 Google LLC
3+
# Copyright 2025 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -31,7 +31,7 @@
3131
class TestClusterManagement(e2e_base.TestEndToEnd):
3232
_temp_prefix = "temp-rov-cluster-management"
3333

34-
@pytest.mark.parametrize("cluster_ray_version", ["2.9", "2.33"])
34+
@pytest.mark.parametrize("cluster_ray_version", ["2.9", "2.33", "2.42"])
3535
def test_cluster_management(self, cluster_ray_version):
3636
assert ray.__version__ == RAY_VERSION
3737
aiplatform.init(project=PROJECT_ID, location="us-central1")

tests/system/vertex_ray/test_job_submission_dashboard.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22

3-
# Copyright 2023 Google LLC
3+
# Copyright 2025 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -35,7 +35,7 @@
3535
class TestJobSubmissionDashboard(e2e_base.TestEndToEnd):
3636
_temp_prefix = "temp-job-submission-dashboard"
3737

38-
@pytest.mark.parametrize("cluster_ray_version", ["2.9", "2.33"])
38+
@pytest.mark.parametrize("cluster_ray_version", ["2.9", "2.33", "2.42"])
3939
def test_job_submission_dashboard(self, cluster_ray_version):
4040
assert ray.__version__ == RAY_VERSION
4141
aiplatform.init(project=PROJECT_ID, location="us-central1")

tests/system/vertex_ray/test_ray_data.py

+26-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22

3-
# Copyright 2023 Google LLC
3+
# Copyright 2025 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -72,17 +72,39 @@
7272
# Write
7373
vertex_ray.data.write_bigquery(
7474
ds,
75-
dataset="bugbashbq1.system_test_ray29_write",
75+
dataset="bugbashbq1.system_test_ray233_write",
76+
)
77+
"""
78+
79+
my_script_ray242 = """
80+
import ray
81+
import vertex_ray
82+
83+
override_num_blocks = 10
84+
query = "SELECT * FROM `bigquery-public-data.ml_datasets.ulb_fraud_detection` LIMIT 10000000"
85+
86+
ds = vertex_ray.data.read_bigquery(
87+
override_num_blocks=override_num_blocks,
88+
query=query,
89+
)
90+
91+
# The reads are lazy, so the end time cannot be captured until ds.materialize() is called
92+
ds.materialize()
93+
94+
# Write
95+
vertex_ray.data.write_bigquery(
96+
ds,
97+
dataset="bugbashbq1.system_test_ray242_write",
7698
)
7799
"""
78100

79-
my_script = {"2.9": my_script_ray29, "2.33": my_script_ray233}
101+
my_script = {"2.9": my_script_ray29, "2.33": my_script_ray233, "2.42": my_script_ray242}
80102

81103

82104
class TestRayData(e2e_base.TestEndToEnd):
83105
_temp_prefix = "temp-ray-data"
84106

85-
@pytest.mark.parametrize("cluster_ray_version", ["2.9", "2.33"])
107+
@pytest.mark.parametrize("cluster_ray_version", ["2.9", "2.33", "2.42"])
86108
def test_ray_data(self, cluster_ray_version):
87109
head_node_type = vertex_ray.Resources()
88110
worker_node_types = [

0 commit comments

Comments
 (0)