BatchEndpointOperations 類別
BatchEndpointOperations。
您不應該直接具現化此類別。 相反地,您應該建立 MLClient 實例,為您具現化它,並將它附加為屬性。
- 繼承
-
azure.ai.ml._scope_dependent_operations._ScopeDependentOperationsBatchEndpointOperations
建構函式
BatchEndpointOperations(operation_scope: OperationScope, operation_config: OperationConfig, service_client_05_2022: AzureMachineLearningWorkspaces, all_operations: OperationsContainer, credentials: TokenCredential | None = None, **kwargs: Dict)
參數
- operation_scope
- <xref:azure.ai.ml._scope_dependent_operations.OperationScope>
必要
MLClient 物件的作業類別範圍變數。
- operation_config
- <xref:azure.ai.ml._scope_dependent_operations.OperationConfig>
必要
MLClient 物件的作業類別的常見組態。
- service_client_05_2022
- <xref:<xref:azure.ai.ml._restclient.v2022_05_01._azure_machine_learning_workspaces. AzureMachineLearningWorkspaces>>
必要
服務用戶端,可讓使用者在 Azure Machine Learning 工作區資源上操作。
- all_operations
- <xref:azure.ai.ml._scope_dependent_operations.OperationsContainer>
必要
MLClient 物件的所有作業類別。
方法
begin_create_or_update |
建立或更新批次端點。 |
begin_delete |
刪除批次端點。 |
get |
取得端點資源。 |
invoke |
使用提供的承載叫用批次端點。 |
list |
列出工作區的端點。 |
list_jobs |
列出所提供批次端點部署下的作業。 這只適用于批次端點。 |
begin_create_or_update
建立或更新批次端點。
begin_create_or_update(endpoint: BatchEndpoint) -> LROPoller[BatchEndpoint]
參數
傳回
用來追蹤作業狀態的輪詢器。
傳回類型
範例
建立端點範例。
from azure.ai.ml.entities import BatchEndpoint
endpoint_example = BatchEndpoint(name=endpoint_name_2)
ml_client.batch_endpoints.begin_create_or_update(endpoint_example)
begin_delete
刪除批次端點。
begin_delete(name: str) -> LROPoller[None]
參數
傳回
用來追蹤作業狀態的輪詢器。
傳回類型
範例
刪除端點範例。
ml_client.batch_endpoints.begin_delete(endpoint_name)
get
取得端點資源。
get(name: str) -> BatchEndpoint
參數
傳回
從服務擷取的端點物件。
傳回類型
範例
取得端點範例。
ml_client.batch_endpoints.get(endpoint_name)
invoke
使用提供的承載叫用批次端點。
invoke(endpoint_name: str, *, deployment_name: str | None = None, inputs: Dict[str, Input] | None = None, **kwargs) -> BatchJob
參數
- deployment_name
- str
(選擇性) 要叫用的特定部署名稱。 這是選擇性的。 根據預設,要求會根據流量規則路由傳送至任何部署。
傳回
叫用的批次部署作業。
傳回類型
例外狀況
如果無法成功驗證部署,則引發 。 錯誤訊息中將會提供詳細資料。
如果 BatchEndpoint 資產 (例如資料、程式碼、模型、環境) 無法成功驗證,則引發。 錯誤訊息中將會提供詳細資料。
如果無法成功驗證 BatchEndpoint 模型,就會引發。 錯誤訊息中將會提供詳細資料。
如果提供的本機路徑指向空目錄,則會引發 。
範例
叫用端點範例。
ml_client.batch_endpoints.invoke(endpoint_name_2)
list
列出工作區的端點。
list() -> ItemPaged[BatchEndpoint]
傳回
端點清單
傳回類型
範例
清單範例。
ml_client.batch_endpoints.list()
list_jobs
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應