TensorFlowDistribution クラス

TensorFlow 分散の構成。

継承
azure.ai.ml.entities._job.distribution.DistributionConfiguration
TensorFlowDistribution

コンストラクター

TensorFlowDistribution(*, parameter_server_count: int | None = 0, worker_count: int | None = None, **kwargs: Any)

キーワードのみのパラメーター

名前 説明
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,
   )

変数

名前 説明
parameter_server_count
int

パラメーター サーバー タスクの数。

worker_count
int

worker 数。 指定しない場合、 は既定でインスタンス数になります。

type
str

分布の種類を指定します。 このクラスの "tensorflow" に自動的に設定します。