Freigeben über


MpiDistribution Klasse

MPI-Verteilungskonfiguration.

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

Konstruktor

MpiDistribution(*, process_count_per_instance: int | None = None, **kwargs: Any)

Nur Schlüsselwortparameter

Name Beschreibung
process_count_per_instance

Die Anzahl von Prozessen pro Knoten.

Beispiele

Konfigurieren einer CommandComponent-Instanz mit einer MpiDistribution.


   from azure.ai.ml import MpiDistribution
   from azure.ai.ml.entities import CommandComponent

   component = CommandComponent(
       name="microsoftsamples_mpi",
       description="This is the MPI 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=MpiDistribution(
           process_count_per_instance=2,
       ),
       instance_count=2,
   )

Variablen

Name Beschreibung
type
str

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