Skip to content
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

fix: Improve vertex filtering and update is_vertex_runnable logic #2612

Merged
merged 9 commits into from
Jul 10, 2024

Conversation

ogabrielluiz
Copy link
Contributor

This pull request includes several enhancements to the codebase:

  • The is_vertex_runnable method in the RunnableVerticesManager class has been improved to include an additional parameter activated_vertices and updated logic to accurately determine if a vertex is runnable.

  • The vertex filtering logic in the useFlowStore function in flowStore.ts has been optimized, resulting in improved performance and accuracy.

  • The is_active method has been added to the Vertex class in base.py to check if a vertex's state is set to ACTIVE.

These changes improve the accuracy, performance, and readability of the codebase.

This commit improves the `is_vertex_runnable` method in the `RunnableVerticesManager` class. It adds an additional parameter `activated_vertices` to the method signature and updates the logic to check if a vertex is runnable based on the presence of activated vertices. This enhancement improves the accuracy of determining whether a vertex is runnable or not.
This commit optimizes the vertex filtering logic in the `useFlowStore` function in `flowStore.ts`. It introduces a more efficient way to filter out vertices that are already being built, resulting in improved performance and accuracy.
This commit adds the `is_active` method to the `Vertex` class in the `base.py` file. The `is_active` method checks if the state of the vertex is set to `ACTIVE` and returns a boolean value accordingly. This enhancement improves the readability and maintainability of the codebase.
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. enhancement New feature or request javascript Pull requests that update Javascript code python Pull requests that update Python code labels Jul 10, 2024
Copy link
Contributor

Pull Request Validation Report

This comment is automatically generated by Conventional PR

Whitelist Report

Whitelist Active Result
Pull request is a draft and should be ignored
Pull request is made by a whitelisted user and should be ignored
Pull request is submitted by a bot and should be ignored
Pull request is submitted by administrators and should be ignored

Result

Pull request does not satisfy any enabled whitelist criteria. Pull request will be validated.

Validation Report

Validation Active Result
All commits in this pull request has valid messages
Pull request does not introduce too many changes
Pull request has a valid title
Pull request has mentioned issues
Pull request has valid branch name
Pull request should have a non-empty body

Result

Pull request satisfies all enabled pull request rules.

Last Modified at 10 Jul 24 00:57 UTC

@github-actions github-actions bot added bug Something isn't working and removed enhancement New feature or request labels Jul 10, 2024
@ogabrielluiz ogabrielluiz enabled auto-merge (squash) July 10, 2024 02:00
@github-actions github-actions bot added bug Something isn't working and removed bug Something isn't working labels Jul 10, 2024
Copy link
Member

@italojohnny italojohnny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ogabrielluiz ogabrielluiz merged commit d28fe8e into main Jul 10, 2024
31 checks passed
@ogabrielluiz ogabrielluiz deleted the add_condition_to_runnable branch July 10, 2024 10:40
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jul 10, 2024
nicoloboschi pushed a commit to datastax/ragstack-ai-langflow that referenced this pull request Jul 11, 2024
…ngflow-ai#2612)

* feat: improve is_vertex_runnable method in RunnableVerticesManager

This commit improves the `is_vertex_runnable` method in the `RunnableVerticesManager` class. It adds an additional parameter `activated_vertices` to the method signature and updates the logic to check if a vertex is runnable based on the presence of activated vertices. This enhancement improves the accuracy of determining whether a vertex is runnable or not.

* fix: add predecessors to vertices_to_run

* style: fix lint issues

* feat: optimize vertex filtering in useFlowStore

This commit optimizes the vertex filtering logic in the `useFlowStore` function in `flowStore.ts`. It introduces a more efficient way to filter out vertices that are already being built, resulting in improved performance and accuracy.

* refactor: add is_active method to Vertex class

This commit adds the `is_active` method to the `Vertex` class in the `base.py` file. The `is_active` method checks if the state of the vertex is set to `ACTIVE` and returns a boolean value accordingly. This enhancement improves the readability and maintainability of the codebase.

* refactor: improve is_vertex_runnable method in RunnableVerticesManager

* refactor: improve find_runnable_predecessors_for_successors method in Graph class

* refactor: move test_create_function

(cherry picked from commit d28fe8e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working javascript Pull requests that update Javascript code lgtm This PR has been approved by a maintainer python Pull requests that update Python code size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants