File tree 2 files changed +12
-2
lines changed
2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 18
18
from google .cloud import aiplatform
19
19
from google .cloud .aiplatform .preview import vertex_ray
20
20
from tests .system .aiplatform import e2e_base
21
+ import datetime
21
22
import ray
22
23
23
24
RAY_VERSION = "2.4.0"
@@ -36,9 +37,12 @@ def test_cluster_management(self):
36
37
head_node_type = vertex_ray .Resources ()
37
38
worker_node_types = [vertex_ray .Resources ()]
38
39
40
+ timestamp = datetime .datetime .now ().strftime ("%Y-%m-%d-%H-%M-%S" )
41
+
39
42
cluster_resource_name = vertex_ray .create_ray_cluster (
40
43
head_node_type = head_node_type ,
41
44
worker_node_types = worker_node_types ,
45
+ cluster_name = f"ray-cluster-{ timestamp } -test-cluster-management" ,
42
46
)
43
47
44
48
cluster_details = vertex_ray .get_ray_cluster (cluster_resource_name )
Original file line number Diff line number Diff line change 19
19
from google .cloud .aiplatform .preview import vertex_ray
20
20
from ray .job_submission import JobSubmissionClient
21
21
from tests .system .aiplatform import e2e_base
22
+ import datetime
22
23
import os
23
24
import ray
24
25
import time
@@ -39,17 +40,22 @@ def test_job_submission_dashboard(self):
39
40
head_node_type = vertex_ray .Resources ()
40
41
worker_node_types = [vertex_ray .Resources ()]
41
42
43
+ timestamp = datetime .datetime .now ().strftime ("%Y-%m-%d-%H-%M-%S" )
44
+
42
45
# Create cluster, get dashboard address
43
46
cluster_resource_name = vertex_ray .create_ray_cluster (
44
47
head_node_type = head_node_type ,
45
48
worker_node_types = worker_node_types ,
49
+ cluster_name = f"ray-cluster{ timestamp } -test-job-submission-dashboard" ,
46
50
)
47
51
48
52
cluster_details = vertex_ray .get_ray_cluster (cluster_resource_name )
49
53
50
- # Connect to cluster
54
+ # Need to use the full path since the installation is editable, not from a release
51
55
client = JobSubmissionClient (
52
- "vertex_ray://{}" .format (cluster_details .dashboard_address )
56
+ "google.cloud.aiplatform.preview.vertex_ray://{}" .format (
57
+ cluster_details .dashboard_address
58
+ )
53
59
)
54
60
55
61
my_script = """
You can’t perform that action at this time.
0 commit comments