刪除自訂模型部署 - Amazon Nova

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

刪除自訂模型部署

使用模型進行隨需推論後,您可以刪除部署。刪除部署後,您無法將其用於隨需推論,但不會刪除基礎自訂模型。

您可以使用 Amazon Bedrock 主控台 AWS Command Line Interface或 AWS SDKs 刪除自訂模型部署。

重要

刪除自訂模型部署是無法復原的。在繼續刪除之前,請確定您不再需要部署。如果您需要再次使用自訂模型進行隨需推論,則必須建立新的部署。

刪除自訂模型部署 (主控台)

刪除自訂模型部署
  1. 在導覽窗格的推論和評估下,選擇隨需自訂模型

  2. 選擇您要刪除的自訂模型部署。

  3. 選擇 刪除

  4. 在確認對話方塊中,輸入部署名稱以確認刪除。

  5. 選擇 Delete (刪除),確認刪除。

當刪除正在進行Deleting時,部署狀態會變更為 。完成後,部署將從清單中移除。

刪除自訂模型部署 (AWS Command Line Interface)

若要使用 刪除自訂模型部署 AWS Command Line Interface,請使用 delete-custom-model-deployment命令搭配您的部署識別符。

aws bedrock delete-custom-model-deployment \ --custom-model-deployment-identifier "deployment-arn-or-name" \ --region region

刪除自訂模型部署 (AWS SDKs)

若要以程式設計方式刪除自訂模型部署,請使用 DeleteCustomModelDeployment API 操作搭配部署的 Amazon Resource Name (ARN) 或名稱。下列程式碼說明如何使用適用於 Python (Boto3) 的 SDK 來刪除自訂模型部署。

def delete_custom_model_deployment(bedrock_client): """Delete a custom model deployment Args: bedrock_client: A boto3 Bedrock client for making API calls Returns: dict: The response from the delete operation Raises: Exception: If there is an error deleting the deployment """ try: response = bedrock_client.delete_custom_model_deployment( customModelDeploymentIdentifier="Deployment identifier" ) print(f"Deployment deletion initiated") return response except Exception as e: print(f"Error deleting deployment: {str(e)}") raise