WorkerConfiguration Class

WorkerConfiguration is the class that holds all the necessary information for the workers to run.

Initialize the WorkerConfiguration

:type azureml.core.runconfig.HistoryConfiguration :param use_gpu: Prameter used to signal whether the default base image should have the packages for

gpu added. This parameter is ignored if environment is set.

yaml file. :type conda_dependencies_file: str

Inheritance
azureml._base_sdk_common.abstract_run_config_element._AbstractRunConfigElement
WorkerConfiguration

Constructor

WorkerConfiguration(node_count, compute_target=None, environment=None, shm_size='2g', history=None, use_gpu=False, pip_packages=None, conda_packages=None, conda_dependencies_file=None, pip_requirements_file=None)

Parameters

node_count
int
Required

Number of worker nodes to be initialized, one worker will run per machine in the compute target.

compute_target
AbstractComputeTarget or str
default value: None

The compute target where the workers will run. This can either be an object or the the compute target's name.

environment
Environment
default value: None

The environment definition for the workers. It includes PythonSection, DockerSection, and environment variables. Any environment option not directly exposed through other parameters to the WorkerConfiguration construction can be set using this parameter. If this parameter is specified, it will be used as a base upon which packages specified in pip_packages and conda_packages will be added.

shm_size
str
default value: 2g

The docker shm_size configuration for the worker.

history
HistoryConfiguration
default value: None

History configuration for the worker's run, this controls which logs folders will be monitored

use_gpu
bool
default value: False

Parameter used to signal whether the default base image should have the packages for gpu added. This parameter is ignored if environment is set.

conda_packages
list
default value: None

A list of strings representing conda packages to be added to the Python environment for the workers.

pip_packages
list
default value: None

A list of strings representing pip packages to be added to the Python environment for the workers

pip_requirements_file
str
default value: None

The relative path to the workers' pip requirements text file. This can be provided in combination with the pip_packages parameter.

conda_dependencies_file
str
default value: None

The relative path to the workers' conda dependencies yaml file.

node_count
int
Required

Number of worker nodes to be initialized, one worker will run per machine in the compute target.

compute_target
<xref:azureml.core.compute_target.ComputeTarget> or str
Required

The compute target where the workers will run. This can either be an object or the the compute target's name.

environment
Environment
Required

The environment definition for the workers. It includes PythonSection, DockerSection, and environment variables. Any environment option not directly exposed through other parameters to the WorkerConfiguration construction can be set using this parameter. If this parameter is specified, it will be used as a base upon which packages specified in pip_packages and conda_packages will be added.

shm_size
str
Required

The docker shm_size configuration for the worker.

history
Required

History configuration for the worker's run, this controls which logs folders will be monitored

conda_packages
list
Required

A list of strings representing conda packages to be added to the Python environment for the workers.

pip_packages
list
Required

A list of strings representing pip packages to be added to the Python environment for the workers

pip_requirements_file
str
Required

The relative path to the workers' pip requirements text file. This can be provided in combination with the pip_packages parameter.

conda_dependencies_file
Required

The relative path to the workers' conda dependencies

Attributes

target

Get the compute target where the worker run is scheduled for execution.

Available cloud compute targets can be found using the function compute_targets

Returns

The target name

Return type

str