-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Description
The topological sort function in the 'sdk.local.graph_utils.py' currently fails to detect the cyclic dependency in the code and proceeds without raising any error.
Reproducible code
from kfp.local import graph_utils
# Scenario: A depends on B, and B depends on A
cyclic_graph = {
"task_A": ["task_B"],
"task_B": ["task_A"]
}
try:
# this should raise an error but it didn't do it
result = graph_utils.topological_sort(cyclic_graph)
print(f"BUG: It didnot crash. Result: {result}")
except Exception as e:
print(f"SUCCESS: It crashed as expected: {e}")