-
Notifications
You must be signed in to change notification settings - Fork 4.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add vertices_being_run set to RunnableVerticesManager #2589
Merged
Conversation
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
…ng edges to predecessor and successor maps in Graph class
…he set and updating the predecessor map in the Graph class
…to vertices_ids set refactor(graph/base.py): fix indentation for predecessor_map and successor_map dictionaries to improve code readability
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]>
dosubot
bot
added
the
size:S
This PR changes 10-29 lines, ignoring generated files.
label
Jul 8, 2024
Pull Request Validation ReportThis comment is automatically generated by Conventional PR Whitelist Report
Result Pull request does not satisfy any enabled whitelist criteria. Pull request will be validated. Validation Report
Result Pull request satisfies all enabled pull request rules. Last Modified at 08 Jul 24 19:18 UTC |
github-actions
bot
added
enhancement
New feature or request
and removed
enhancement
New feature or request
labels
Jul 8, 2024
…bleVerticesManager
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.
…he set and updating the predecessor map in the Graph class
dosubot
bot
added
size:M
This PR changes 30-99 lines, ignoring generated files.
and removed
size:S
This PR changes 10-29 lines, ignoring generated files.
labels
Jul 8, 2024
vasconceloscezar
approved these changes
Jul 8, 2024
ogabrielluiz
added a commit
to yaitec/langflow
that referenced
this pull request
Jul 9, 2024
…-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
nicoloboschi
pushed a commit
to datastax/ragstack-ai-langflow
that referenced
this pull request
Jul 10, 2024
…-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 (cherry picked from commit 38b10b0)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
New feature or request
lgtm
This PR has been approved by a maintainer
size:M
This PR changes 30-99 lines, ignoring generated files.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit adds a new set called
vertices_being_run
to theRunnableVerticesManager
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.