Updated on 2024-04-30 GMT+08:00

Parameter Overview

Placeholder

Parameter

Description

Mandatory

Data Type

name

Parameter name, which must be globally unique.

Yes

str

placeholder_type

Parameter type. The mapping between placeholder types and actual data types:

PlaceholderType.INT -> int

PlaceholderType.STR -> str

PlaceholderType.BOOL -> bool

PlaceholderType.FLOAT -> float

PlaceholderType.ENUM -> Enum

PlaceholderType.JSON -> dict

PlaceholderType.LIST -> list

  • When the type is PlaceholderType.ENUM, the enum_list field cannot be empty.
  • When the type is PlaceholderType.LIST, the placeholder_format field cannot be empty and can only be set to str, int, float, or bool, indicating the data types in the list.

Yes

PlaceholderType

default

Default parameter value. The data type must be the same as that of placeholder_type.

No

Any

placeholder_format

Supported data formats. Currently, obs, flavor, train_flavor, and swr are supported.

No

str

delay

Whether parameters are set when the workflow is running. The default value is False, indicating that parameters are set before the workflow runs. If the value is True, parameters are set in an action of the phase where they are needed.

No

bool

description

Parameter description

No

str

enum_list

List of enumerated values of a parameter. This parameter is mandatory only for parameters of PlaceholderType.ENUM type.

No

list

constraint

Constraints on parameters. This parameter only supports the constraints of training specifications and is not visible to you.

No

dict

required

Whether the parameter is mandatory.

  • The default value is True.
  • This parameter cannot be set to False for Delay.

This parameter is optional at the frontend during execution.

No

bool