Skip to content

Improve UI for lazy caching #10873

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

Merged
merged 7 commits into from
Mar 25, 2025
Merged

Improve UI for lazy caching #10873

merged 7 commits into from
Mar 25, 2025

Conversation

abidlabs
Copy link
Member

@abidlabs abidlabs commented Mar 24, 2025

When examples were cached, we previously combined two events together: loading the input value and loading the output value. For eager caching, this makes sense, but for lazy caching, we should first load the input value (since that's instantaneous) and then load the output value, which can be time-consuming.

Closes: #10866

@gradio-pr-bot
Copy link
Collaborator

gradio-pr-bot commented Mar 24, 2025

🪼 branch checks and previews

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

Install Gradio from this PR

pip install https://gradio-pypi-previews.s3.amazonaws.com/38ad2931e0b4361bfa8b255ab64c235c3b62020c/gradio-5.23.0-py3-none-any.whl

Install Gradio Python Client from this PR

pip install "gradio-client @ git+https://github.com/gradio-app/gradio@38ad2931e0b4361bfa8b255ab64c235c3b62020c#subdirectory=client/python"

Install Gradio JS Client from this PR

npm install https://gradio-npm-previews.s3.amazonaws.com/38ad2931e0b4361bfa8b255ab64c235c3b62020c/gradio-client-1.14.0.tgz

Use Lite from this PR

<script type="module" src="https://gradio-lite-previews.s3.amazonaws.com/38ad2931e0b4361bfa8b255ab64c235c3b62020c/dist/lite.js""></script>

@gradio-pr-bot
Copy link
Collaborator

gradio-pr-bot commented Mar 24, 2025

🦄 change detected

This Pull Request includes changes to the following packages.

Package Version
gradio patch
  • Maintainers can select this checkbox to manually select packages to update.

With the following changelog entry.

Improve UI for lazy caching

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.

@abidlabs
Copy link
Member Author

I think this should also close: #10362, @hysts can you confirm?

@hysts
Copy link
Collaborator

hysts commented Mar 25, 2025

Thanks! But it seems that #10362 still persists.
As there's another issue #6690 related to gr.Progress and gr.Examples, #10362 might be a bit different issue from the one this PR resolves.

@abidlabs
Copy link
Member Author

Ok thanks for confirming @hysts!

@abidlabs abidlabs marked this pull request as ready for review March 25, 2025 15:39
Copy link
Collaborator

@aliabid94 aliabid94 left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Collaborator

@freddyaboulton freddyaboulton left a comment

Choose a reason for hiding this comment

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

Verified + looks good @abidlabs

@abidlabs
Copy link
Member Author

Thanks folks!

@abidlabs abidlabs merged commit 3a3d0d9 into main Mar 25, 2025
22 checks passed
@abidlabs abidlabs deleted the improve-lazy-ui branch March 25, 2025 16:54
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.

Evaluating new examples does not show any visual indication of processing with cache_examples = "lazy"
5 participants