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

属性总览

Placeholder

属性

描述

是否必填

数据类型

name

参数名称,需要保证全局唯一。

str

placeholder_type

参数类型,与真实数据类型的映射关系如下:

PlaceholderType.INT -> int

PlaceholderType.STR -> str

PlaceholderType.BOOL -> bool

PlaceholderType.FLOAT -> float

PlaceholderType.ENUM -> Enum

PlaceholderType.JSON -> dict

PlaceholderType.LIST -> list

  • 当类型为PlaceholderType.ENUM时,enum_list字段不能为空。
  • 当类型为PlaceholderType.LIST时,placeholder_format字段不能为空,且只能填写str/int/float/bool,用来表示list中的数据类型。

PlaceholderType

default

参数默认值,数据类型需要与placeholder_type一致。

Any

placeholder_format

支持的format格式数据,当前支持obs、flavor、train_flavor、swr。

str

delay

参数是否运行时输入,默认为“False”,在工作流启动运行前进行配置。设置为“True”,则在使用的相应节点运行时卡点配置。

bool

description

参数描述信息。

str

enum_list

参数枚举值列表,只有当参数类型为PlaceholderType.ENUM时才需要填写。

list

constraint

参数相关的约束配置,当前该字段仅支持训练规格的约束,且用户不感知。

dict

required

参数是否必填标记。

  • 默认required=True。
  • Delay参数不能设required=False。

运行时前端可以不填此参数。

bool