Skip to content

Commit

Permalink
docs: Clean up RoV create_ray_cluster docstring
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 579272542
  • Loading branch information
matthew29tang authored and copybara-github committed Nov 3, 2023
1 parent be1df7f commit 1473e19
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions google/cloud/aiplatform/preview/vertex_ray/cluster_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,17 @@ def create_ray_cluster(
)]
cluster_resource_name = vertex_ray.create_ray_cluster(
head_node_type=head_node_type,
network="my-vpc",
worker_node_types=worker_node_types,
head_node_type=head_node_type,
network="projects/my-project-number/global/networks/my-vpc-name",
worker_node_types=worker_node_types,
)
After a ray cluster is set up, you can call
`ray.init(vertex_ray://{cluster_resource_name}, runtime_env=...)` without
`ray.init(f"vertex_ray://{cluster_resource_name}", runtime_env=...)` without
specifying ray cluster address to connect to the cluster. To shut down the
cluster you can call `ray.delete_ray_cluster()`.
Note: If the active ray cluster haven't shut down, you cannot create a new ray
cluster with the same cluster_name.
Note: If the active ray cluster has not finished shutting down, you cannot
create a new ray cluster with the same cluster_name.
Args:
head_node_type: The head node resource. Resources.node_count must be 1.
Expand Down

0 comments on commit 1473e19

Please sign in to comment.