在 Gemini Enterprise Agent Platform 上完成 Ray 集群的应用开发后,删除集群以避免产生不必要的计费。
控制台
在 Google Cloud 控制台中,前往“Ray on Agent Platform”页面。
选择要删除的 Gemini Enterprise Agent Platform 上的 Ray 集群。
点击删除。
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).