Delete the Ray cluster on Vertex AI

When you've finished developing an application for your Ray cluster on Vertex AI, delete the cluster to avoid unnecessary billing.

Console

  1. In the Google Cloud console, go to the Ray on Vertex AI page.

    Go to the Ray page

  2. Select the Ray cluster on Vertex AI you want to delete.

  3. Click Delete.

Vertex AI SDK for Python

From the same Python environment where you connected to your Ray cluster on Vertex AI, run the following:

# Shut down the Ray on Vertex AI if currently connected
ray.shutdown()

# Delete cluster
vertex_ray.delete_ray_cluster(CLUSTER_RESOURCE_NAME)

Where:

  • CLUSTER_RESOURCE_NAME: CLUSTER_RESOURCE_NAME='projects/{}/locations/{}/persistentResources/{}'.format(PROJECT_ID, LOCATION, CLUSTER_NAME).