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

Add notebook on concurrent tasks #81

Merged
merged 8 commits into from
May 10, 2024
Merged

Add notebook on concurrent tasks #81

merged 8 commits into from
May 10, 2024

Conversation

anakin87
Copy link
Member

@anakin87 anakin87 commented May 9, 2024

Result of https://github.com/deepset-ai/haystack-private/issues/73

@masci: I need your technical review
@mrm1001 @deepset-ai/devrel: please review the messaging

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@anakin87 anakin87 requested review from a team, masci and mrm1001 May 9, 2024 08:26
@bilgeyucel bilgeyucel self-requested a review May 9, 2024 08:43
Copy link
Contributor

@masci masci left a comment

Choose a reason for hiding this comment

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

I think we should avoid any language that implies this can represent a substitute of asynchronous pipelines. Let's frame the message around something like "you can improve a pipeline's performance by running multiple jobs concurrently inside a custom component"

README.md Outdated Show resolved Hide resolved
anakin87 and others added 2 commits May 9, 2024 10:51
Co-authored-by: Massimiliano Pippi <[email protected]>
notebooks/concurrent_tasks.ipynb Show resolved Hide resolved
notebooks/concurrent_tasks.ipynb Show resolved Hide resolved
notebooks/concurrent_tasks.ipynb Show resolved Hide resolved
@@ -0,0 +1,1226 @@
{
Copy link
Member

@mrm1001 mrm1001 May 9, 2024

Choose a reason for hiding this comment

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

Is asyncio technically using threading? I thought it was single-threaded execution.


Reply via ReviewNB

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm using asyncio.to_thread: it creates separate threads. In this case, asyncio is only used as a high-level API.

Copy link
Contributor

Choose a reason for hiding this comment

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

See my comment above

@mrm1001
Copy link
Member

mrm1001 commented May 9, 2024

Lovely work!! Could we replace the "workaround" vocab to maybe "optimisation"?

notebooks/concurrent_tasks.ipynb Show resolved Hide resolved
notebooks/concurrent_tasks.ipynb Show resolved Hide resolved
notebooks/concurrent_tasks.ipynb Show resolved Hide resolved
notebooks/concurrent_tasks.ipynb Show resolved Hide resolved
notebooks/concurrent_tasks.ipynb Show resolved Hide resolved
notebooks/concurrent_tasks.ipynb Show resolved Hide resolved
notebooks/concurrent_tasks.ipynb Show resolved Hide resolved
notebooks/concurrent_tasks.ipynb Show resolved Hide resolved
@anakin87 anakin87 requested a review from TuanaCelik May 10, 2024 08:46
@anakin87 anakin87 merged commit 14c0b1c into main May 10, 2024
@anakin87 anakin87 deleted the concurrent-workaround branch May 10, 2024 11:08
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.

None yet

5 participants