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

Refactor Cancelling Logic To Use /cancel #8370

Merged
merged 7 commits into from
Jun 5, 2024
Merged

Conversation

freddyaboulton
Copy link
Collaborator

@freddyaboulton freddyaboulton commented May 23, 2024

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

  1. 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

  2. You may need to run the linters: bash scripts/format_backend.sh and bash scripts/format_frontend.sh

@gradio-pr-bot
Copy link
Contributor

gradio-pr-bot commented May 23, 2024

🪼 branch checks and previews

Name Status URL
Spaces ready! Spaces preview
Website ready! Website preview
Storybook ready! Storybook preview
🦄 Changes detected! Details

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

@gradio-pr-bot
Copy link
Contributor

gradio-pr-bot commented May 23, 2024

🦄 change detected

This Pull Request includes changes to the following packages.

Package Version
@gradio/app patch
@gradio/client patch
gradio patch
  • Maintainers can select this checkbox to manually select packages to update.

With the following changelog entry.

Refactor Cancelling Logic To Use /cancel

Maintainers or the PR author can modify the PR title to modify this entry.

Something isn't right?

  • Maintainers can change the version label to modify the version bump.
  • If the bot has failed to detect any changes, or if this pull request needs to update multiple packages to different versions or requires a more comprehensive changelog entry, maintainers can update the changelog file directly.

@freddyaboulton freddyaboulton added the v: patch A change that requires a patch release label May 23, 2024
@@ -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
Copy link
Collaborator Author

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.

@freddyaboulton freddyaboulton requested review from pngwn, aliabid94 and hannahblair and removed request for pngwn, aliabid94 and hannahblair May 24, 2024 14:16
@freddyaboulton freddyaboulton marked this pull request as ready for review May 24, 2024 17:22
@freddyaboulton
Copy link
Collaborator Author

Bump @aliabid94

Copy link
Member

@pngwn pngwn left a 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!

@freddyaboulton
Copy link
Collaborator Author

Thanks everyone for the reviews!

@freddyaboulton freddyaboulton merged commit 48eeea4 into main Jun 5, 2024
8 checks passed
@freddyaboulton freddyaboulton deleted the cancel-refactor branch June 5, 2024 19:32
@pngwn pngwn mentioned this pull request Jun 5, 2024
pngwn pushed a commit that referenced this pull request Jun 5, 2024
* Cancel refactor

* add changeset

* add changeset

* types

* Add code

* Fix types

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
pngwn added a commit that referenced this pull request Jun 6, 2024
…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>
@pngwn pngwn mentioned this pull request Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v: patch A change that requires a patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants