刪除 Gemini Enterprise Agent Platform 上的 Ray 叢集

在 Gemini Enterprise Agent Platform 上開發 Ray 叢集的應用程式後,請刪除叢集,以免產生不必要的費用。

控制台

  1. 前往 Google Cloud 控制台的「Ray on Agent Platform」頁面。

    前往 Ray 頁面

  2. 選取要刪除的 Gemini Enterprise Agent Platform Ray 叢集。

  3. 點選「刪除」。

Agent Platform SDK for Python

在您透過 Gemini Enterprise Agent Platform 連線至 Ray 叢集的相同 Python 環境中,執行下列指令:

# Shut down the Ray on Agent Platform 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).