TensorFlowDistribution Class
TensorFlow distribution configuration.
- Inheritance
-
azure.ai.ml.entities._job.distribution.DistributionConfigurationTensorFlowDistribution
Constructor
TensorFlowDistribution(*, parameter_server_count: int | None = 0, worker_count: int | None = None, **kwargs: Any)
Keyword-Only Parameters
Name | Description |
---|---|
parameter_server_count
|
The number of parameter server tasks. Defaults to 0. |
worker_count
|
The number of workers. Defaults to the instance count. |
Examples
Configuring a CommandComponent with a 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,
)
Variables
Name | Description |
---|---|
parameter_server_count
|
Number of parameter server tasks. |
worker_count
|
Number of workers. If not specified, will default to the instance count. |
type
|
Specifies the type of distribution. Set automatically to "tensorflow" for this class. |
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Azure SDK for Python