-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Environment
-
KFP version:
N/A (local Python SDK usage) -
KFP SDK version:
main branch (commit-based, cloned from https://github.com/kubeflow/pipelines)
Description
The local graph utility used for pipeline task ordering does not explicitly detect
cyclic dependencies.
Steps to reproduce
Minimal reproducible example:
from kfp.local import graph_utils
graph = {
'A': ['B'],
'B': ['A'],
}
graph_utils.topological_sort(graph)Expected result
The function should fail fast with a clear and user-friendly error
(e.g. ValueError) indicating that a cyclic dependency was detected.
Since topological sorting is only defined for DAGs, cyclic task
dependencies should be treated as a user error during local execution.
Materials and Reference
-
Source code under discussion:
sdk/python/kfp/local/graph_utils.py -
Background reference:
Topological sorting is only defined for directed acyclic graphs (DAGs).
Cyclic task dependencies represent a user error and should be detected
explicitly during local pipeline execution.
Impacted by this bug? Give it a 👍.