-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Refactor Cancelling Logic To Use /cancel #8370
Conversation
🪼 branch checks and previews
Install Gradio from this PR pip install https://gradio-builds.s3.amazonaws.com/c2dd4a187c238295017c70526b6ddc1dd2c41238/gradio-4.33.0-py3-none-any.whl Install Gradio Python Client from this PR pip install "gradio-client @ git+https://github.com/gradio-app/gradio@c2dd4a187c238295017c70526b6ddc1dd2c41238#subdirectory=client/python" Install Gradio JS Client from this PR npm install https://gradio-builds.s3.amazonaws.com/c2dd4a187c238295017c70526b6ddc1dd2c41238/gradio-client-0.20.1.tgz |
🦄 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.
|
@@ -1916,7 +1904,7 @@ async def process_api( | |||
] | |||
data, changed_state_ids = zip(*data_and_changed_state_ids) | |||
if root_path is not None: | |||
data = processing_utils.add_root_url(data, root_path, None) | |||
data = processing_utils.add_root_url(data, root_path, None) # type: ignore |
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.
Removing the Any
return type hint from postprocess_data
makes pyright complain about this line. I think it does not understand the zip(*...)
in line 1905.
89cf0ab
to
fb9651c
Compare
Bump @aliabid94 |
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.
Frontend looks good! Thanks @freddyaboulton!
Thanks everyone for the reviews! |
* Cancel refactor * add changeset * add changeset * types * Add code * Fix types --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
…forms (#8451) * fix param name * format * save * changes * changes * fix param name * format * switch to async iterable interface * switch to async iterable interface * changes * add changeset * fix * fix param name * format * fixes * fix checks * fix checks * add changeset * fix checks * add changeset * add changeset * fix checks * fix param name * format * fix types * cleanup comments * add changeset * fix param name * format * changes * Refactor Cancelling Logic To Use /cancel (#8370) * Cancel refactor * add changeset * add changeset * types * Add code * Fix types --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> * fix param name * format * changes * fix * fix param name * format * fix test * fix notebooks * fix type --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com>
Description
Follow-up from #8260 comment. All the cancelling logic happens in
/cancel
route.🎯 PRs Should Target Issues
Before your create a PR, please check to see if there is an existing issue for this change. If not, please create an issue before you create this PR, unless the fix is very small.
Not adhering to this guideline will result in the PR being closed.
Tests
PRs will only be merged if tests pass on CI. To run the tests locally, please set up your Gradio environment locally and run the tests:
bash scripts/run_all_tests.sh
You may need to run the linters:
bash scripts/format_backend.sh
andbash scripts/format_frontend.sh