Spark 類別
Spark 節點的基類,用於 Spark 元件版本耗用量。
您不應該直接具現化此類別。 相反地,您應該從建立器函式建立它:spark。
] :p aram 輸出:輸出名稱對應至作業中使用的輸出資料來源。 :type outputs: Dict[str, Union[str, ~azure.ai.ml.Output]] :p aram args:作業的引數。 :type args: str :p aram compute:作業執行的計算資源。 :type compute: str :p aram 資源:作業的計算資源組態。 :type resources: Union[Dict, ~azure.ai.ml.entities.SparkResourceConfiguration] :p aram entry: 檔案或類別進入點。 :type entry: Dict[str, str] :p aram py_files:要放在 Python 應用程式的 PYTHONPATH 上 .zip、.egg 或 .py 檔案清單。 :type py_files: List[str] :p aram jars:清單。要包含在驅動程式和執行程式類別路徑上的 JAR 檔案。 :type jars: List[str] :p aram 檔案:要放在每個執行程式的工作目錄中的檔案清單。 :type files: List[str] :p aram 封存:要擷取到每個執行程式的工作目錄中的封存清單。 :type archives: List[str]
- 繼承
-
azure.ai.ml.entities._builders.base_node.BaseNodeSparkazure.ai.ml.entities._job.spark_job_entry_mixin.SparkJobEntryMixinSpark
建構函式
Spark(*, component: str | SparkComponent, identity: Dict[str, str] | ManagedIdentityConfiguration | AmlTokenConfiguration | UserIdentityConfiguration | None = None, driver_cores: int | None = None, driver_memory: str | None = None, executor_cores: int | None = None, executor_memory: str | None = None, executor_instances: int | None = None, dynamic_allocation_enabled: bool | None = None, dynamic_allocation_min_executors: int | None = None, dynamic_allocation_max_executors: int | None = None, conf: Dict[str, str] | None = None, inputs: Dict[str, NodeOutput | Input | str | bool | int | float | Enum] | None = None, outputs: Dict[str, str | Output] | None = None, compute: str | None = None, resources: Dict | SparkResourceConfiguration | None = None, entry: Dict[str, str] | SparkJobEntry | None = None, py_files: List[str] | None = None, jars: List[str] | None = None, files: List[str] | None = None, archives: List[str] | None = None, args: str | None = None, **kwargs)
參數
- identity
- Union[ Dict[str, str], ManagedIdentityConfiguration, AmlTokenConfiguration, UserIdentityConfiguration]
在計算上執行時,Spark 作業將使用的身分識別。
- inputs
- Dict[str, Union[ <xref:azure.ai.ml.entities._job.pipeline._io.NodeOutput>, Input, str, bool, int, float, <xref:Enum>, ]
輸入名稱與作業中使用的輸入資料來源對應。
方法
clear | |
copy | |
dump |
以 YAML 格式將作業內容傾印到檔案中。 |
fromkeys |
建立新的字典,其中包含可反覆運算的索引鍵,並將值設定為 value。 |
get |
如果索引鍵位於字典中,則傳回索引鍵的值,否則為預設值。 |
items | |
keys | |
pop |
如果找不到索引鍵,則傳回指定的預設值;否則,請引發 KeyError。 |
popitem |
將 (索引鍵、值) 組移除並傳回為 2 元組。 以 LIFO (先出) 順序傳回配對。 如果聽寫是空的,則會引發 KeyError。 |
setdefault |
如果索引鍵不在字典中,則插入預設值為預設值的索引鍵。 如果索引鍵位於字典中,則傳回索引鍵的值,否則為預設值。 |
update |
如果 E 存在且具有 .keys () 方法,則執行: e: D[k] = E[k] 如果 E 存在且缺少 .keys () 方法,則會執行: for k, v in E: D[k] = v 在任一案例中,後面接著: f: D[k] = F[k] |
values |
clear
clear() -> None. Remove all items from D.
copy
copy() -> a shallow copy of D
dump
以 YAML 格式將作業內容傾印到檔案中。
dump(dest: str | PathLike | IO, **kwargs) -> None
參數
要寫入 YAML 內容的本機路徑或檔案資料流程。 如果 dest 是檔案路徑,將會建立新的檔案。 如果 dest 是開啟的檔案,則會直接將檔案寫入。
- kwargs
- dict
要傳遞至 YAML 序列化程式的其他引數。
例外狀況
如果 dest 是檔案路徑且檔案已經存在,則會引發 。
如果 dest 是開啟的檔案,而且檔案無法寫入,則引發。
fromkeys
建立新的字典,其中包含可反覆運算的索引鍵,並將值設定為 value。
fromkeys(value=None, /)
參數
- type
- iterable
- value
get
如果索引鍵位於字典中,則傳回索引鍵的值,否則為預設值。
get(key, default=None, /)
參數
- key
- default
items
items() -> a set-like object providing a view on D's items
keys
keys() -> a set-like object providing a view on D's keys
pop
如果找不到索引鍵,則傳回指定的預設值;否則,請引發 KeyError。
pop(k, [d]) -> v, remove specified key and return the corresponding value.
popitem
將 (索引鍵、值) 組移除並傳回為 2 元組。
以 LIFO (先出) 順序傳回配對。 如果聽寫是空的,則會引發 KeyError。
popitem()
setdefault
如果索引鍵不在字典中,則插入預設值為預設值的索引鍵。
如果索引鍵位於字典中,則傳回索引鍵的值,否則為預設值。
setdefault(key, default=None, /)
參數
- key
- default
update
如果 E 存在且具有 .keys () 方法,則執行: e: D[k] = E[k] 如果 E 存在且缺少 .keys () 方法,則會執行: for k, v in E: D[k] = v 在任一案例中,後面接著: f: D[k] = F[k]
update([E], **F) -> None. Update D from dict/iterable E and F.
values
values() -> an object providing a view on D's values
屬性
base_path
code
component
creation_context
entry
id
identity
在計算上執行時,Spark 作業將使用的身分識別。
傳回類型
inputs
log_files
name
outputs
resources
status
工作的狀態。
傳回的常見值包括「執行中」、「已完成」和「失敗」。 所有可能的值為:
NotStarted - 這是用戶端 Run 物件在雲端提交之前所在的暫時狀態。
啟動 - 執行已在雲端中開始處理。 呼叫端此時具有執行識別碼。
布建 - 正在針對指定的作業提交建立隨選計算。
準備 - 正在準備執行環境,且處於兩個階段之一:
Docker 映射組建
conda 環境設定
已排入佇列 - 作業已排入計算目標上的佇列。 例如,在 BatchAI 中,作業處於佇列狀態
等候所有要求的節點準備就緒時。
執行 - 作業已開始在計算目標上執行。
完成 - 使用者程式碼執行已完成,且執行處於後續處理階段。
CancelRequested - 作業已要求取消。
已完成 - 執行已順利完成。 這包括使用者程式碼執行和執行
後續處理階段。
失敗 - 執行失敗。 執行上的 Error 屬性通常會提供原因的詳細資料。
已取消 - 遵循取消要求,並指出現在已成功取消執行。
NotResponding - 針對已啟用活動訊號的執行,最近不會傳送活動訊號。
傳回
作業的狀態。
傳回類型
studio_url
type
CODE_ID_RE_PATTERN
CODE_ID_RE_PATTERN = re.compile('\\/subscriptions\\/(?P<subscription>[\\w,-]+)\\/resourceGroups\\/(?P<resource_group>[\\w,-]+)\\/providers\\/Microsoft\\.MachineLearningServices\\/workspaces\\/(?P<workspace>[\\w,-]+)\\/codes\\/(?P<co)
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應