刪除 Vertex AI 上的 Ray 叢集

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

控制台

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

    前往 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).