刪除 Vertex AI 上的 Ray 叢集

在 Vertex AI 上完成 Ray 叢集的應用程式開發後,請刪除叢集,以免產生不必要的帳單費用。

控制台

  1. 前往 Google Cloud 控制台的 Ray on Vertex AI 頁面。

    前往 Ray 頁面

  2. 選取要刪除的 Vertex AI 上的 Ray 叢集。

  3. 點選「刪除」。

Python 適用的 Vertex AI SDK

在您連線至 Vertex AI Ray 叢集的 Python 環境中,執行下列指令:

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

# Delete cluster
vertex_ray.delete_ray_cluster(CLUSTER_RESOURCE_NAME)

其中:

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