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 unintended exponential algorithm in recursive_will_execute #2964

Closed

Conversation

tomKPZ
Copy link

@tomKPZ tomKPZ commented Mar 4, 2024

The intention of recursive_will_execute is to count the number of nodes that will be executed given some target nodes. However, the implementation used a list instead of a set for the count, so nodes were unintentionally getting duplicated. The count of each node ended up being the number of paths that reach that node instead of just 1. In general, there may be exponentially many paths which led to OOM errors with deeper graphs.

execution.py Outdated Show resolved Hide resolved
@tomKPZ
Copy link
Author

tomKPZ commented Mar 16, 2024

Friendly ping

@tomKPZ
Copy link
Author

tomKPZ commented Apr 8, 2024

Are any further changes required? If you're uncomfortable landing as-is, I can revert the changes in recursive_output_delete_if_changed and only keep the changes in recursive_will_execute, and the issue will still be fixed.

@mcmonkey4eva
Copy link
Collaborator

this is presumably entirely outdated due to #2666 now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants