Updated on 2024-08-14 GMT+08:00
Examples
- Integer parameter
from modelarts import workflow as wf wf.Placeholder(name="placeholder_int", placeholder_type=wf.PlaceholderType.INT, default=1, description="This is an integer parameter.")
- String parameter
from modelarts import workflow as wf wf.Placeholder(name="placeholder_str", placeholder_type=wf.PlaceholderType.STR, default="default_value", description="This is a string parameter.")
- Bool parameter
from modelarts import workflow as wf wf.Placeholder(name="placeholder_bool", placeholder_type=wf.PlaceholderType.BOOL, default=True, description="This is a bool parameter.")
- Float parameter
from modelarts import workflow as wf wf.Placeholder(name="placeholder_float", placeholder_type=wf.PlaceholderType.FLOAT, default=0.1, description="This is a float parameter.")
- Enumeration parameter
from modelarts import workflow as wf wf.Placeholder(name="placeholder_enum", placeholder_type=wf.PlaceholderType.ENUM, default="a", enum_list=["a", "b"], description="This is an enumeration parameter.")
- Dictionary parameter
from modelarts import workflow as wf wf.Placeholder(name="placeholder_dict", placeholder_type=wf.PlaceholderType.JSON, default={"key": "value"}, description="This is a dictionary parameter.")
- List parameter
from modelarts import workflow as wf wf.Placeholder(name="placeholder_list", placeholder_type=wf.PlaceholderType.LIST, default=[1, 2], placeholder_format="int", description="This is a list parameter and its value is an integer.")
Parent topic: Parameter Configuration
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot