取消部署模型並刪除端點

請使用下列其中一種方法取消部署模型並刪除端點。

Google Cloud 控制台

  1. 請按照下列步驟取消部署模型:

    1. 在 Google Cloud 控制台的 Vertex AI 專區中,前往「Endpoints」頁面。

      前往「Endpoints」(端點) 頁面

    2. 按一下要取消部署的模型名稱和版本 ID,開啟詳細資料頁面。

    3. 在模型的資料列中,依序按一下 「Actions」和「Undeploy model from endpoint」

    4. 在「Undeploy model from endpoint」對話方塊中,按一下「Undeploy」

    5. 如要刪除其他模型,請重複上述步驟。

  2. 選用:如要刪除線上推論端點,請按照下列步驟操作:

    1. 在 Google Cloud 控制台的「Vertex AI」專區中,前往「線上預測」頁面。

      前往線上預測

    2. 選取端點。

    3. 如要刪除端點,請依序點選 「Actions」和「Delete endpoint」

gcloud

  1. 列出專案中所有端點的端點 ID:

    gcloud ai endpoints list \
        --project=PROJECT_ID \
        --region=LOCATION_ID
    

    PROJECT_ID 替換為您的專案名稱,並將 LOCATION_ID 替換為您使用 Vertex AI 的區域。

  2. 列出已部署至端點的模型 ID:

    gcloud ai endpoints describe ENDPOINT_ID \
        --project=PROJECT_ID \
        --region=LOCATION_ID
    

    ENDPOINT_ID 替換為端點 ID。

  3. 從端點取消部署模型:

    gcloud ai endpoints undeploy-model ENDPOINT_ID \
        --project=PROJECT_ID \
        --region=LOCATION_ID \
        --deployed-model-id=DEPLOYED_MODEL_ID
    

    DEPLOYED_MODEL_ID 替換為模型 ID。

  4. 選用:刪除線上推論端點:

    gcloud ai endpoints delete ENDPOINT_ID \
        --project=PROJECT_ID \
        --region=LOCATION_ID