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
Fixes streaming event race condition #7926
Conversation
🪼 branch checks and previews
Install Gradio from this PR pip install https://gradio-builds.s3.amazonaws.com/9d8da6384503bddbe8ee5097489d1f93f5e388db/gradio-4.25.0-py3-none-any.whl Install Gradio Python Client from this PR pip install "gradio-client @ git+https://github.com/gradio-app/gradio@9d8da6384503bddbe8ee5097489d1f93f5e388db#subdirectory=client/python" |
🦄 change detectedThis Pull Request includes changes to the following packages.
With the following changelog entry.
Maintainers or the PR author can modify the PR title to modify this entry.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice fix @aliabid94 !
I can confirm that I no longer see the issue in the duplicated (private atm) mPLUGOwl/Doc Space when using the gradio wheels from this PR. Thanks @aliabid94 ! |
Can you explain what the race condition is here? It isn't obvious from the code or tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good otherwise! Thanks @aliabid94!
race condition was that sometimes the client would receive the |
Thanks for fixing @aliabid94 |
This helped me streaming agent a lot! TY! |
Happened because of how we were closing event streams. Added a test that blasts lots of events rapidly so we don't run into this again. Test by running demo/rapid_generation on main and this branch.
Fixes: #7921