Usage 類別

AzureML 資源使用量。

繼承
azure.ai.ml.entities._mixins.RestTranslatableMixin
Usage

建構函式

Usage(id: str | None = None, aml_workspace_location: str | None = None, type: str | None = None, unit: str | UsageUnit | None = None, current_value: int | None = None, limit: int | None = None, name: UsageName | None = None)

參數

id
Optional[str]
預設值: None

資源識別碼。

aml_workspace_location
Optional[str]
預設值: None

識別碼所指定的 AzureML 工作區區域。

type
Optional[str]
預設值: None

資源類型。

unit
Optional[Union[str, UsageUnit]]
預設值: None

使用量的度量單位。 接受的值是 「Count」。

current_value
Optional[int]
預設值: None

資源的目前使用量。

limit
Optional[int]
預設值: None

資源允許的最大使用量。

name
Optional[UsageName]
預設值: None

使用類型的名稱。

方法

dump

以 YAML 格式將作業內容傾印到檔案中。

dump

以 YAML 格式將作業內容傾印到檔案中。

dump(dest: str | PathLike | IO, **kwargs) -> None

參數

dest
Union[<xref:PathLike>, str, IO[AnyStr]]
必要

要寫入 YAML 內容的本機路徑或檔案資料流程。 如果 dest 是檔案路徑,將會建立新的檔案。 如果 dest 是開啟的檔案,則會直接將檔案寫入。

kwargs
dict

要傳遞至 YAML 序列化程式的其他引數。

例外狀況

FileExistsError if dest is a file path and the file already exists.
IOError if dest is an open file and the file is not writable.