Skip to content

Commit ae3677c

Browse files
matthew29tangcopybara-github
authored andcommitted
chore: Use full path for Ray on Vertex Job Submission Client prefix
PiperOrigin-RevId: 586736110
1 parent 9a204c4 commit ae3677c

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

tests/system/vertex_ray/test_cluster_management.py

+4
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
from google.cloud import aiplatform
1919
from google.cloud.aiplatform.preview import vertex_ray
2020
from tests.system.aiplatform import e2e_base
21+
import datetime
2122
import ray
2223

2324
RAY_VERSION = "2.4.0"
@@ -36,9 +37,12 @@ def test_cluster_management(self):
3637
head_node_type = vertex_ray.Resources()
3738
worker_node_types = [vertex_ray.Resources()]
3839

40+
timestamp = datetime.datetime.now().strftime("%Y-%m-%d-%H-%M-%S")
41+
3942
cluster_resource_name = vertex_ray.create_ray_cluster(
4043
head_node_type=head_node_type,
4144
worker_node_types=worker_node_types,
45+
cluster_name=f"ray-cluster-{timestamp}-test-cluster-management",
4246
)
4347

4448
cluster_details = vertex_ray.get_ray_cluster(cluster_resource_name)

tests/system/vertex_ray/test_job_submission_dashboard.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
from google.cloud.aiplatform.preview import vertex_ray
2020
from ray.job_submission import JobSubmissionClient
2121
from tests.system.aiplatform import e2e_base
22+
import datetime
2223
import os
2324
import ray
2425
import time
@@ -39,17 +40,22 @@ def test_job_submission_dashboard(self):
3940
head_node_type = vertex_ray.Resources()
4041
worker_node_types = [vertex_ray.Resources()]
4142

43+
timestamp = datetime.datetime.now().strftime("%Y-%m-%d-%H-%M-%S")
44+
4245
# Create cluster, get dashboard address
4346
cluster_resource_name = vertex_ray.create_ray_cluster(
4447
head_node_type=head_node_type,
4548
worker_node_types=worker_node_types,
49+
cluster_name=f"ray-cluster{timestamp}-test-job-submission-dashboard",
4650
)
4751

4852
cluster_details = vertex_ray.get_ray_cluster(cluster_resource_name)
4953

50-
# Connect to cluster
54+
# Need to use the full path since the installation is editable, not from a release
5155
client = JobSubmissionClient(
52-
"vertex_ray://{}".format(cluster_details.dashboard_address)
56+
"google.cloud.aiplatform.preview.vertex_ray://{}".format(
57+
cluster_details.dashboard_address
58+
)
5359
)
5460

5561
my_script = """

0 commit comments

Comments
 (0)