File tree Expand file tree Collapse file tree 1 file changed +4
-20
lines changed
libs/labelbox/src/labelbox/schema/workflow Expand file tree Collapse file tree 1 file changed +4
-20
lines changed Original file line number Diff line number Diff line change 61
61
def _validate_definition_id (
62
62
definition_id_str : str , node_id : str
63
63
) -> WorkflowDefinitionId :
64
- """Validate and normalize a workflow definition ID with consistent error handling .
64
+ """Validate and normalize a workflow definition ID.
65
65
66
66
Args:
67
67
definition_id_str: The definition ID string to validate
@@ -71,26 +71,10 @@ def _validate_definition_id(
71
71
WorkflowDefinitionId: Validated definition ID or fallback
72
72
"""
73
73
try :
74
- if definition_id_str in (
75
- "initial_labeling_task" ,
76
- "initial_rework_task" ,
77
- "review_task" ,
78
- "send_to_rework" ,
79
- "logic" ,
80
- "done" ,
81
- "custom_rework_task" ,
82
- "auto_qa" ,
83
- ):
84
- return WorkflowDefinitionId (definition_id_str )
85
- else :
86
- logger .warning (
87
- f"Unknown WorkflowDefinitionId '{ definition_id_str } ' for node { node_id } . "
88
- f"Using InitialLabelingTask as fallback."
89
- )
90
- return WorkflowDefinitionId .InitialLabelingTask
91
- except ValueError :
74
+ return WorkflowDefinitionId (definition_id_str )
75
+ except ValueError as e :
92
76
logger .warning (
93
- f"Invalid WorkflowDefinitionId '{ definition_id_str } ' for node { node_id } . "
77
+ f"Invalid WorkflowDefinitionId '{ definition_id_str } ' for node { node_id } : { e } . "
94
78
f"Using InitialLabelingTask as fallback."
95
79
)
96
80
return WorkflowDefinitionId .InitialLabelingTask
You can’t perform that action at this time.
0 commit comments