You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I wanted to check the async functionality from #142
I am using AsyncPipeline from the haystack_experimental.core package, and I observed unexpected behavior during pipeline execution. While the pipeline executes two concurrent calls successfully, the components A and B, which are not dependent on each other, do not execute concurrently. Instead, B starts only after A finishes, despite no explicit dependency between them.
ComponentA run_async started at 2024-12-03 17:51:08
ComponentA run_async started at 2024-12-03 17:51:08
ComponentA run_async ended at 2024-12-03 17:51:11
Pipeline output: {'A': {'A_output': 'Processed by A: Test data 1'}}
ComponentB run_async started at 2024-12-03 17:51:11
ComponentA run_async ended at 2024-12-03 17:51:11
Pipeline output: {'A': {'A_output': 'Processed by A: Test data 2'}}
ComponentB run_async started at 2024-12-03 17:51:11
ComponentB run_async ended at 2024-12-03 17:51:13
Pipeline output: {'B': {'B_output': 'Processed by B: Test data 1'}}
ComponentC run_async started at 2024-12-03 17:51:13
ComponentB run_async ended at 2024-12-03 17:51:13
Pipeline output: {'B': {'B_output': 'Processed by B: Test data 2'}}
ComponentC run_async started at 2024-12-03 17:51:13
ComponentC run_async ended at 2024-12-03 17:51:14
Pipeline output: {'C': {'C_output': 'C combined outputs: Processed by A: Test data 1, Processed by B: Test data 1'}}
Pipeline output: {'C': {'C_output': 'C combined outputs: Processed by A: Test data 1, Processed by B: Test data 1'}}
ComponentC run_async ended at 2024-12-03 17:51:14
Pipeline output: {'C': {'C_output': 'C combined outputs: Processed by A: Test data 2, Processed by B: Test data 2'}}
Pipeline output: {'C': {'C_output': 'C combined outputs: Processed by A: Test data 2, Processed by B: Test data 2'}}
Could you confirm if this is the expected behavior of AsyncPipeline? If not, what adjustments should be made to achieve true component-wise concurrency?
Hello @alex-stoica this is expected behavior. Components that are in the same pipeline are not expected to run concurrently in the current implementation.
Thanks for trying out haystack-experimental and providing feedback!
Hello, I wanted to check the async functionality from #142
I am using
AsyncPipeline
from thehaystack_experimental.core
package, and I observed unexpected behavior during pipeline execution. While the pipeline executes two concurrent calls successfully, the componentsA
andB
, which are not dependent on each other, do not execute concurrently. Instead,B
starts only afterA
finishes, despite no explicit dependency between them.For reference, my code is
and my output is
Could you confirm if this is the expected behavior of AsyncPipeline? If not, what adjustments should be made to achieve true component-wise concurrency?
Environment:
haystack
version: 2.7.0haystack-integrations
version: 0.3.1.dev11+ge1aebb8 (installed via git+https://github.com/deepset-ai/haystack-experimental.git)The text was updated successfully, but these errors were encountered: