KubernetesCompute 類別
Kubernetes 計算資源。
- 繼承
-
azure.ai.ml.entities._compute.compute.ComputeKubernetesCompute
建構函式
KubernetesCompute(*, namespace: str = 'default', properties: Dict[str, Any] | None = None, identity: IdentityConfiguration | None = None, **kwargs: Any)
參數
名稱 | Description |
---|---|
namespace
必要
|
KubernetesCompute 的命名空間。 預設值為 「default」。 |
properties
必要
|
Kubernetes 計算資源的屬性。 |
identity
必要
|
與計算叢集相關聯的身分識別。 |
僅限關鍵字的參數
名稱 | Description |
---|---|
namespace
|
預設值: default
|
properties
必要
|
|
identity
必要
|
|
範例
建立 KubernetesCompute 物件。
from azure.ai.ml.entities import KubernetesCompute
k8s_compute = KubernetesCompute(
identity=IdentityConfiguration(
type="UserAssigned",
user_assigned_identities=[
ManagedIdentityConfiguration(
resource_id="/subscriptions/1234567-abcd-ef12-1234-12345/resourcegroups/our_rg_eastus/providers/Microsoft.ManagedIdentity/userAssignedIdentities/our-agent-aks"
)
],
),
)
方法
dump |
以 yaml 格式將計算內容傾印到檔案中。 |
dump
以 yaml 格式將計算內容傾印到檔案中。
dump(dest: str | PathLike | IO, **kwargs: Any) -> None
參數
名稱 | Description |
---|---|
dest
必要
|
接收此計算內容的目的地。 必須是本機檔案的路徑,或已開啟的檔案資料流程。 如果 dest 是檔案路徑,將會建立新的檔案,如果檔案存在,則會引發例外狀況。 如果 dest 是開啟的檔案,則會將檔案直接寫入,如果檔案無法寫入,則會引發例外狀況。 |
屬性
base_path
created_on
creation_context
id
provisioning_errors
provisioning_state
type
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應