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

Remove the use of asyncio.run to make asyncio work in colab #69

Merged
merged 5 commits into from
Nov 12, 2024

Conversation

vutrung96
Copy link
Contributor

@vutrung96 vutrung96 commented Nov 12, 2024

We're using asyncio.run in our processor, but this will fail in colab where there is a loop already running since asyncio.run creates a new asyncio loop.

What we need to do is first checking if there are any running loops and use that loop instead. If a loop doesn't already exist, we create it.

Closes #68

@vutrung96 vutrung96 changed the base branch from main to dev November 12, 2024 20:00
@vutrung96 vutrung96 requested a review from CharlieJCJ November 12, 2024 20:00
@vutrung96 vutrung96 changed the title Make asyncio work in colab Remove the use of asyncio.run to make asyncio work in colab Nov 12, 2024
Copy link
Contributor

@RyanMarten RyanMarten left a comment

Choose a reason for hiding this comment

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

LGTM!

@RyanMarten RyanMarten merged commit ade84b3 into dev Nov 12, 2024
@RyanMarten RyanMarten deleted the trung/fix-async-loop branch November 12, 2024 20:10
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.

2 participants