JobSpec

更新时间:
复制 MD 格式

Parameter

Type

Description

Example

object

Describes the detailed configuration for a type of worker. This includes the device specification, runtime image, and number of replicas.

Type

string

The role type. It is determined by the job type, as different job types support different roles.

  • TFJob: Supports Chief, PS, Worker, Evaluator, and GraphLearn.

  • PyTorchJob: Supports Master and Worker.

  • XGBoostJob: Supports Master and Worker.

  • OneFlowJob: Supports Master and Worker.

  • ElasticBatch: Supports Master and Worker.

  • RayJob: Supports Head, Worker, and Worker[-xxx].

For PyTorchJob, XGBoostJob, OneFlowJob, and ElasticBatch, the Master role is optional. If you do not specify a Master, the system designates the first Worker pod as the Master.

Worker

Image

string

The Registry Address of the runtime image for this worker type. Call ListImages to get the runtime images that PAI provides. You can also specify a public third-party runtime image.

registry-vpc.cn-hangzhou.aliyuncs.com/cloud-dsw/tensorflow:1.12PAI-gpu-py36-cu101-ubuntu18.04

ImageConfig ImageConfig

The configuration for a private runtime image.

PodCount

integer

The number of replicas.

1

ExtraPodSpec ExtraPodSpec

The extra pod configuration.

ResourceConfig ResourceConfig

The resource configuration.

UseSpotInstance

boolean

Specifies whether to use spot instances.

false

SpotSpec SpotSpec

The spot instance configuration.

AssignNodeSpec

AssignNodeSpec

The configuration for the specified scheduling node.

LocalMountSpecs

array

A list of local mount configurations.

LocalMountSpec

The local mount configuration.

AutoScalingSpec

AutoScalingSpec

The auto scaling configuration.

ServiceSpec ServiceSpec

The service configuration.

IsCheif

boolean

This parameter is misspelled and deprecated.

IsChief

boolean

Marks whether this role is the Chief role. There can be only one Chief role.

RestartPolicy

string

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

ExitCode

SystemDisk

SystemDisk

EcsSpec

string

The device specification of the worker. For a detailed list of specifications, see PAI-DLC billing.

Important Prices vary based on the specification.

ecs.c6.large

QuotaId

string

ConsiderInSuccessPolicy

boolean

Indicates whether this role's completion is required for the job to succeed. This setting applies only when the job's success policy is Partial.

StartupDependencies

array

The dependencies required before this role can start.

StartupDependency

ElasticSpotSpecs

array

ElasticSpotSpec