TensorFlowDistribution 類別
TensorFlow 散發組態。
- 繼承
-
azure.ai.ml.entities._job.distribution.DistributionConfigurationTensorFlowDistribution
建構函式
TensorFlowDistribution(*, parameter_server_count: int | None = 0, worker_count: int | None = None, **kwargs: Any)
僅限關鍵字的參數
名稱 | Description |
---|---|
parameter_server_count
|
參數伺服器工作的數目。 預設為 0。 |
worker_count
|
背景工作角色的數目。 預設為實例計數。 |
範例
使用 TensorFlowDistribution 設定 CommandComponent。
from azure.ai.ml import TensorFlowDistribution
from azure.ai.ml.entities import CommandComponent
component = CommandComponent(
name="microsoftsamples_tf",
description="This is the TF command component",
inputs={
"component_in_number": {"description": "A number", "type": "number", "default": 10.99},
"component_in_path": {"description": "A path", "type": "uri_folder"},
},
outputs={"component_out_path": {"type": "uri_folder"}},
command="echo Hello World & echo ${{inputs.component_in_number}} & echo ${{inputs.component_in_path}} "
"& echo ${{outputs.component_out_path}}",
environment="AzureML-sklearn-1.0-ubuntu20.04-py38-cpu:33",
distribution=TensorFlowDistribution(
parameter_server_count=1,
worker_count=2,
),
instance_count=2,
)
變數
名稱 | Description |
---|---|
parameter_server_count
|
參數伺服器工作的數目。 |
worker_count
|
背景工作數目。 如果未指定,則會預設為實例計數。 |
type
|
指定散發的類型。 將此類別自動設定為 「tensorflow」。 |
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應