更新时间:2024-04-30 GMT+08:00

属性总览

您可以使用JobStep来构建作业类型节点,JobStep结构如下

表1 JobStep

属性

描述

是否必填

数据类型

name

作业节点的名称,命名规范:只能包含英文字母、数字、下划线(_)、中划线(-),并且只能以英文字母开头,长度限制为64字符,一个Workflow里的两个step名称不能重复

str

algorithm

算法对象

BaseAlgorithm, Algorithm, AIGalleryAlgorithm

spec

作业使用的资源规格相关配置

JobSpec

inputs

作业节点的输入列表

JobInput或者JobInput的列表

outputs

作业节点的输出列表

JobOutput或者JobOutput的列表

title

title信息,主要用于前端的名称展示

str

description

作业节点的描述信息

str

policy

节点执行的policy

StepPolicy

depend_steps

依赖的节点列表

Step或者Step的列表

表2 JobInput

属性

描述

是否必填

数据类型

name

作业类型节点的输入名称,命名规范:只能包含英文字母、数字、下划线(_)、中划线(-),并且只能以英文字母开头,长度限制为64字符。同一个Step的输入名称不能重复

str

data

作业类型节点的输入数据对象

数据集或OBS相关对象,当前仅支持Dataset,DatasetPlaceholder,DatasetConsumption,OBSPath,OBSConsumption,OBSPlaceholder,DataConsumptionSelector

表3 JobOutput

属性

描述

是否必填

数据类型

name

作业类型节点的输出名称,命名规范:只能包含英文字母、数字、下划线(_)、中划线(-),并且只能以英文字母开头,长度限制为64字符。同一个Step的输出名称不能重复

str

obs_config

输出的OBS相关配置

OBSOutputConfig

model_config

输出的模型相关配置

ModelConfig

metrics_config

metrics相关配置

MetricsConfig

表4 OBSOutputConfig

属性

描述

是否必填

数据类型

obs_path

已存在的OBS目录

str、Placeholder、Storage

metric_file

存储metric信息的文件名称

str、Placeholder

表5 BaseAlgorithm

属性

描述

是否必填

数据类型

id

算法管理的算法ID

str

subscription_id

订阅算法的订阅ID

str

item_version_id

订阅算法的版本号

str

code_dir

代码目录

str,Placeholder,Storage

boot_file

启动文件

str,Placeholder,Storage

command

启动命令

str,Placeholder

parameters

算法超参

AlgorithmParameters的列表

engine

作业使用的镜像信息

JobEngine

environments

环境变量

dict

表6 Algorithm

属性

描述

是否必填

数据类型

algorithm_id

算法管理的算法ID

str

parameters

算法超参

AlgorithmParameters的列表

表7 AIGalleryAlgorithm

属性

描述

是否必填

数据类型

subscription_id

订阅算法的订阅ID

str

item_version_id

订阅算法的版本号

str

parameters

算法超参

AlgorithmParameters的列表

表8 AlgorithmParameters

属性

描述

是否必填

数据类型

name

算法超参的名称

str

value

算法超参的值

int, bool, float, str, Placeholder, Storage

表9 JobEngine

属性

描述

是否必填

数据类型

engine_id

镜像ID

str,Placeholder

engine_name

镜像名称

str,Placeholder

engine_version

镜像版本

str,Placeholder

image_url

镜像url

str,Placeholder

表10 JobSpec

属性

描述

是否必填

数据类型

resource

资源信息

JobResource

log_export_path

日志输出路径

LogExportPath

schedule_policy

作业调度配置策略

SchedulePolicy

volumes

作业挂载的文件系统信息

list[Volume]

表11 JobResource

属性

描述

是否必填

数据类型

flavor

资源规格

Placeholder

node_count

节点个数,默认为1,多节点表示支持分布式

int,Placeholder

表12 SchedulePolicy

属性

描述

是否必填

数据类型

priority

作业调度的优先级,仅支持配置为1、2、3,分别对应低、中、高三种优先级

int,Placeholder

表13 Volume

属性

描述

是否必填

数据类型

nfs

NFS文件系统对象

NFS

表14 NFS

属性

描述

是否必填

数据类型

nfs_server_path

NFS文件系统的服务地址

str,Placeholder

local_path

挂载到容器里面的路径

str,Placeholder

read_only

是否只读的方式挂载

bool,Placeholder