Updated on 2024-08-14 GMT+08:00

Parameter Overview

You can use JobStep to create a job phase. The following is an example of defining a JobStep.

Table 1 JobStep

Parameter

Description

Mandatory

Data Type

name

Name of a job phase. The name contains a maximum of 64 characters, including only letters, digits, underscores (_), and hyphens (-). It must start with a letter and must be unique in a workflow.

Yes

str

algorithm

Algorithm object

Yes

BaseAlgorithm, Algorithm, AIGalleryAlgorithm

spec

Job specifications

Yes

JobSpec

inputs

Inputs of a job phase

Yes

JobInput or JobInput list

outputs

Outputs of a job phase

Yes

JobOutput or JobOutput list

title

Title for frontend display

No

str

description

Description of a job phase

No

str

policy

Phase execution policy

No

StepPolicy

depend_steps

Dependency phases

No

Step or step list

Table 2 JobInput

Parameter

Description

Mandatory

Data Type

name

Input name of the job phase. The name can contain a maximum of 64 characters, including only letters, digits, underscores (_), and hyphens (-), and must start with a letter. The input name of a step must be unique.

Yes

str

data

Input data object of a job phase

Yes

Dataset or OBS object. Currently, only Dataset, DatasetPlaceholder, DatasetConsumption, OBSPath, OBSConsumption, OBSPlaceholder, and DataConsumptionSelector are supported.

Table 3 JobOutput

Parameter

Description

Mandatory

Data Type

name

Output name of the job phase. The name can contain a maximum of 64 characters, including only letters, digits, underscores (_), and hyphens (-), and must start with a letter. The output name of a step must be unique.

Yes

str

obs_config

OBS output configuration

No

OBSOutputConfig

model_config

Model output configuration

No

ModelConfig

metrics_config

Metrics configuration

No

MetricsConfig

Table 4 OBSOutputConfig

Parameter

Description

Mandatory

Data Type

obs_path

Existing OBS directory

Yes

str, Placeholder, Storage

metric_file

Name of the file that stores metric information

No

str, Placeholder

Table 5 BaseAlgorithm

Parameter

Description

Mandatory

Data Type

id

Algorithm ID

No

str

subscription_id

Subscription ID of the subscribed algorithm

No

str

item_version_id

Version ID of the subscribed algorithm

No

str

code_dir

Code directory

No

str, Placeholder, Storage

boot_file

Boot file

No

str, Placeholder, Storage

command

Boot command

No

str, Placeholder

parameters

Algorithm hyperparameters

No

AlgorithmParameters list

engine

Information about the image used by the job

No

JobEngine

environments

Environment variables

No

dict

Table 6 Algorithm

Parameter

Description

Mandatory

Data Type

algorithm_id

Algorithm ID

Yes

str

parameters

Algorithm hyperparameters

No

AlgorithmParameters list

Table 7 AIGalleryAlgorithm

Parameter

Description

Mandatory

Data Type

subscription_id

Subscription ID of the subscribed algorithm

Yes

str

item_version_id

Version ID of the subscribed algorithm

Yes

str

parameters

Algorithm hyperparameters

No

AlgorithmParameters list

Table 8 AlgorithmParameters

Parameter

Description

Mandatory

Data Type

name

Name of an algorithm hyperparameter

Yes

str

value

Value of an algorithm hyperparameter

Yes

int, bool, float, str, Placeholder, Storage

Table 9 JobEngine

Parameter

Description

Mandatory

Data Type

engine_id

Image ID

No

str, Placeholder

engine_name

Image name

No

str, Placeholder

engine_version

Image version

No

str, Placeholder

image_url

Image URL

No

str, Placeholder

Table 10 JobSpec

Parameter

Description

Mandatory

Data Type

resource

Resource

Yes

JobResource

log_export_path

Log output path

No

LogExportPath

schedule_policy

Job scheduling policy

No

SchedulePolicy

volumes

Information about the file system mounted to the job

No

list[Volume]

Table 11 JobResource

Parameter

Description

Mandatory

Data Type

flavor

Resource specifications

Yes

Placeholder

node_count

Number of nodes. The default value is 1. If there are multiple nodes, distributed training is supported.

No

int, Placeholder

Table 12 SchedulePolicy

Parameter

Description

Mandatory

Data Type

priority

Job scheduling priority. The value can only be 1, 2, or 3, indicating low, medium, and high priorities, respectively.

Yes

int, Placeholder

Table 13 Volume

Parameter

Description

Mandatory

Data Type

nfs

NFS file system object

No

NFS

pfs

OBS parallel file system object. In a volume object, either PFS or NFS can be specified.

No

PFS, Placeholder

Table 14 NFS

Parameter

Description

Mandatory

Data Type

nfs_server_path

Service address of the NFS file system.

Yes

str, Placeholder

local_path

Path mounted to the container.

Yes

str, Placeholder

read_only

Indicates if the mount mode is set to read-only.

No

bool, Placeholder

Table 15 PFS

Parameter

Description

Mandatory

Data Type

pfs_path

Path of the parallel file system

Yes

str, Placeholder

local_path

Path mounted to the container.

Yes

str, Placeholder