forked from langflow-ai/langflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add vertices_being_run set to RunnableVerticesManager (langflow…
…-ai#2589) * refactor(base.py): remove unnecessary conditional statements for adding edges to predecessor and successor maps in Graph class * refactor(graph/base.py): optimize the process of adding vertices to the set and updating the predecessor map in the Graph class * refactor(graph/base.py): remove unnecessary line that adds vertex_id to vertices_ids set refactor(graph/base.py): fix indentation for predecessor_map and successor_map dictionaries to improve code readability * feat: Add vertices_being_run set to RunnableVerticesManager This commit adds a new set called `vertices_being_run` to the `RunnableVerticesManager` class. This set keeps track of vertices that are currently running. The purpose of this set is to prevent a vertex from being considered runnable if it is already being run. Co-authored-by: Gabriel Luiz Freitas Almeida <[email protected]> * chore: Remove unnecessary vertex from next_runnable_vertices in RunnableVerticesManager * feat: Update vertices_to_run logic in retrieve_vertices_order function This commit updates the logic for retrieving the vertices to run in the `retrieve_vertices_order` function in `chat.py`. The previous implementation used the `list` function to convert the `vertices_to_run` set to a list and then concatenated it with the result of the `get_top_level_vertices` function. The updated logic uses the `union` method to combine the two sets directly. This change improves the efficiency and readability of the code. * refactor(graph/base.py): optimize the process of adding vertices to the set and updating the predecessor map in the Graph class
- Loading branch information
1 parent
6ff2234
commit 6ea295f
Showing
3 changed files
with
24 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters