All Products
Search
Document Center

Platform For AI:JobSpec

Last Updated:Jul 01, 2025
ParameterTypeDescriptionExample
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.

ImageConfigImageConfig

The configuration of the private image.

UseSpotInstancedeprecatedboolean

Whether to use preemptible instances.

false
ServiceSpecServiceSpec

The service configurations.

EcsSpecstring

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
AssignNodeSpecAssignNodeSpec

The scheduling node configurations.

RestartPolicystring

The restart policy. Valid values: Always, Never, OnFailure, and ExitCode.

ExitCode
Imagestring

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
PodCountlong

The number of replicas.

1
Typestring

The worker type, which is related to JobType. The valid values of this parameter vary based on the value of JobType.

  • Valid values when JobType is set to TFJob: Chief, PS, Worker, Evaluator, and GraphLearn.
  • Valid values when JobType is set to PyTorchJob: Worker and Master.
  • Valid values when JobType is set to XGBoostJob: Worker and Master.
  • Valid values when JobType is set to OneFlowJob: Worker and Master.
  • Valid values when JobType is set to ElasticBatch: Worker and Master.

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
SpotSpecSpotSpec

The configurations of the preemptible instance.

IsCheifdeprecatedboolean

Deprecated.

ResourceConfigResourceConfig

The resource configurations.

AutoScalingSpecAutoScalingSpec

The auto scaling configurations.

LocalMountSpecsarray

The list of local mount configurations.

LocalMountSpec

Local mount configuration.

ExtraPodSpecExtraPodSpec

The additional pod configurations.

IsChiefboolean

Whether the role is a Chief role. Chief role must be unique.