Skip to main content

Module graph_utils

Module graph_utils 

Source

Functionsยง

clone_subgraph
Creates a new minimal Graph containing only the specified nodes and the edges connecting them.
get_upstream_nodes
Returns all nodes that are upstream (ancestors) of the target node, including the target itself. Only considers Normal edges (not Feedback) to avoid capturing entire feedback loops if not necessary.
topological_sort
Sorts the graph nodes topologically. If cycles are detected, they are returned as well.