Share via


TensorFlowDistribution Klasse

TensorFlow-Verteilungskonfiguration.

Vererbung
azure.ai.ml.entities._job.distribution.DistributionConfiguration
TensorFlowDistribution

Konstruktor

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

Nur Schlüsselwortparameter

Name Beschreibung
parameter_server_count

Die Anzahl an Parameterserveraufgaben. Der Standardwert ist 0.

worker_count

Die Anzahl der Mitarbeiter. Standardmäßig wird die anzahl der instance festgelegt.

Beispiele

Konfigurieren einer CommandComponent mit einer TensorFlowDistribution.


   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,
   )

Variablen

Name Beschreibung
parameter_server_count
int

Anzahl der Parameterservertasks.

worker_count
int

Anz. von Workern. Wenn nicht angegeben, wird standardmäßig die anzahl der instance angegeben.

type
str

Gibt den Verteilungstyp an. Legen Sie für diese Klasse automatisch auf "tensorflow" fest.