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

Verify correct execution order of Components with Variadic input type and greediness #7873

Open
silvanocerza opened this issue Jun 14, 2024 · 0 comments
Labels
2.x Related to Haystack v2.0 P2 Medium priority, add to the next sprint if no P1 available topic:core

Comments

@silvanocerza
Copy link
Contributor

This issue stems from this comment in PR #7849.

While refactoring Pipeline.run() for #7614 we stumbled upon a confusing issue with Components that have at least an input of type Variadic and also are marked as "greedy" with the is_greedy argument of the @component decorator.

We noticed that those Components when receiving inputs would be removed from the execution queue (to_run) and the queue for those Components that are waiting for inputs (waiting_for_input), and only then added back at the back of the execution queue (to_run). Though the previous version of the comment related to that snippet implied that the Component is put on TOP of the execution queue (to_run).

Changing that snippet to put the Component with Variadic input type and is_greedy set to True on top of the queue instead of the back doesn't make any of our tests fail. Also changing it to only put the Component in the back of the execution queue only if it's not already there doesn't make any test fail.

As of now we're unsure whether changing this behaviour would break any existing use case.

After some discussion with @masci and @shadeMe we decided to keep the current behaviour and update the comment I mentioned above to reflect the current behaviour to avoid breaking anything and mopen an issue to track this and investigate a bit more.

This issue is also related to #7871.

@shadeMe shadeMe added P2 Medium priority, add to the next sprint if no P1 available 2.x Related to Haystack v2.0 topic:core labels Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.x Related to Haystack v2.0 P2 Medium priority, add to the next sprint if no P1 available topic:core
Projects
None yet
Development

No branches or pull requests

2 participants