| Parameter | Type | Description | Example |
|---|---|---|---|
| object | The detailed configurations of a type of worker, including the hardware specifications, the image run by the worker node, and the number of replicas. | ||
| ImageConfig | ImageConfig | The configuration of the private image. | |
UseSpotInstancedeprecated | boolean | Whether to use preemptible instances. | false |
| ServiceSpec | ServiceSpec | The service configurations. | |
| EcsSpec | string | The hardware specifications of the worker. For more information, see Billing of DLC of PAI. Note
The price varies based on instance types.
| ecs.c6.large |
| AssignNodeSpec | AssignNodeSpec | The scheduling node configurations. | |
| RestartPolicy | string | The restart policy. Valid values: Always, Never, OnFailure, and ExitCode. | ExitCode |
| Image | string | The address of the image that is run by the worker node. You can call ListImages to obtain the image provided by PAI. You can also specify a third-party public image. | registry-vpc.cn-hangzhou.aliyuncs.com/cloud-dsw/tensorflow:1.12PAI-gpu-py36-cu101-ubuntu18.04 |
| PodCount | long | The number of replicas. | 1 |
| Type | string | The worker type, which is related to JobType. The valid values of this parameter vary based on the value of JobType.
The Master node in jobs of the PyTorchJob, XGBoostJob, OneFlowJob, or ElasticBatch type is optional. If you do not specify the Master node, the system automatically uses the first Worker node as the Master node. | Worker |
| SpotSpec | SpotSpec | The configurations of the preemptible instance. | |
IsCheifdeprecated | boolean | Deprecated. | |
| ResourceConfig | ResourceConfig | The resource configurations. | |
| AutoScalingSpec | AutoScalingSpec | The auto scaling configurations. | |
| LocalMountSpecs | array | The list of local mount configurations. | |
| LocalMountSpec | Local mount configuration. | ||
| ExtraPodSpec | ExtraPodSpec | The additional pod configurations. | |
| IsChief | boolean | Whether the role is a Chief role. Chief role must be unique. |