Why does the mark_branch method in ConditionalRouter need to replace run_manager.run_predecessors? #8892
Replies: 1 comment
-
|
The mark_branch method needs to replace run_manager.run_predecessors to ensure that only the components in the selected branch are considered for execution. mark_branch builds a new predecessor map based on the visited vertices of the chosen branch and updates run_manager.run_predecessors with this filtered map. This prevents components outside the active branch from being marked as runnable. If you reconstruct run_manager.run_predecessors globally (without this selective filtering), components from other branches may become eligible to run, which can cause them to execute multiple times or out of order. This selective update is essential for correct and efficient execution, especially in flows with conditional routing or cycles see implementation run_manager details. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Reconstructing run_manager.run_predecessors will cause some components to execute multiple times.
Beta Was this translation helpful? Give feedback.
All reactions