diff --git a/sdk/python/kfp/dsl/tasks_group.py b/sdk/python/kfp/dsl/tasks_group.py index f8dfc7976d85..6e711572cb22 100644 --- a/sdk/python/kfp/dsl/tasks_group.py +++ b/sdk/python/kfp/dsl/tasks_group.py @@ -150,9 +150,12 @@ def __has_dependent_tasks(self) -> bool: if not self.exit_task.inputs: return False - return any( - isinstance(task_input, PipelineParameterChannel) - for task_input in self.exit_task.inputs.values()) + for task_input in self.exit_task.inputs.values(): + if isinstance( + task_input, + PipelineParameterChannel) and task_input.task is not None: + return True + return False class ConditionBranches(TasksGroup):