共用方式為


KubernetesCompute 類別

Kubernetes 計算資源。

繼承
azure.ai.ml.entities._compute.compute.Compute
KubernetesCompute

建構函式

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
必要
Union[<xref:PathLike>, str, IO[AnyStr]]

接收此計算內容的目的地。 必須是本機檔案的路徑,或已開啟的檔案資料流程。 如果 dest 是檔案路徑,將會建立新的檔案,如果檔案存在,則會引發例外狀況。 如果 dest 是開啟的檔案,則會將檔案直接寫入,如果檔案無法寫入,則會引發例外狀況。

屬性

base_path

資源的基底路徑。

傳回

類型 Description
str

資源的基底路徑。

created_on

計算資源建立時間戳記。

傳回

類型 Description

計算資源建立時間戳記。

creation_context

資源的建立內容。

傳回

類型 Description

資源的建立中繼資料。

id

資源識別碼。

傳回

類型 Description

資源的全域識別碼,Azure Resource Manager (ARM) 識別碼。

provisioning_errors

計算資源布建錯誤。

傳回

類型 Description

計算資源布建錯誤。

provisioning_state

計算資源的布建狀態。

傳回

類型 Description

計算資源的布建狀態。

type

計算類型。

傳回

類型 Description

計算類型。