Skip to content

[serve] Integrate and Document Bring-Your-Own Gradio Applications - #26403

Merged
edoakes merged 11 commits into
ray-project:masterfrom
zcin:gradio
Aug 5, 2022
Merged

edoakes merged 11 commits into
ray-project:masterfrom
zcin:gradio

Conversation

@zcin

@zcin zcin commented Jul 8, 2022

Copy link
Copy Markdown
Contributor

Why are these changes needed?

Integration between Ray Serve and Gradio. Users of Gradio can wrap their Gradio app in a Serve deployment by using GradioIngress, and scale it up through more replicas or more CPU/GPU resources.

Related issue number

Checks

@zcin zcin added serve Ray Serve Related Issue docs An issue or change related to documentation labels Jul 8, 2022
@zcin
zcin marked this pull request as ready for review July 14, 2022 17:22

@edoakes edoakes left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Awesome work on the documentation!

Comment thread python/ray/serve/tests/test_gradio.py Resolved
Comment thread python/ray/serve/gradio.py Outdated

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is this a public API that's guaranteed by gradio to remain stable?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Not that I know of. Should we sync with Gradio team on this?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Yes, definitely. We need to make sure any APIs we use are public & stable otherwise our integration could break at any point without warning.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Abubakar confirmed that this API will remain stable, and they will add tests around gr.routes.App.create_app() to make sure the API signature doesn't change!

Comment thread python/ray/serve/gradio.py Resolved
Comment on lines 247 to 249

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nit: use async def as best practice :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately Gradio doesn't support async functions in gr.Interface yet :(

@shrekris-anyscale shrekris-anyscale left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great work so far on this integration! I've added some comments.

Comment thread .buildkite/pipeline.yml Resolved
Comment thread python/ray/serve/tests/test_gradio.py Resolved
Comment thread python/ray/serve/tests/test_gradio.py Resolved
Comment thread python/ray/serve/tests/test_gradio.py Resolved
Comment thread python/requirements.txt Resolved
@zcin
zcin requested a review from sihanwang41 as a code owner July 21, 2022 18:44

@shrekris-anyscale shrekris-anyscale left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice updates! I added some comments for the documentation.

@simon-mo simon-mo changed the title [WIP][serve] Gradio Integration [serve] Integrate and Document Bring-Your-Own Gradio Applications Jul 22, 2022
Comment thread .buildkite/pipeline.yml Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

you should also filter out this test from regular test suites both in windows (ci.sh) and here.

Comment thread doc/source/serve/tutorials/index.md Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

remove this page plz

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Got it, I'll remove the actual file as well.

Signed-off-by: Cindy Zhang <[email protected]>

@shrekris-anyscale shrekris-anyscale left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice work so far! I had a small nit about the section titling, but other that that, this change looks pretty good.

zcin added 3 commits August 4, 2022 20:03
Signed-off-by: Cindy Zhang <[email protected]>
Signed-off-by: Cindy Zhang <[email protected]>
Signed-off-by: Cindy Zhang <[email protected]>
@edoakes
edoakes merged commit 8a9d994 into ray-project:master Aug 5, 2022
zcin added a commit to zcin/ray that referenced this pull request Aug 5, 2022
…y-project#26403)

Integration between Ray Serve and Gradio. Users of Gradio can wrap their Gradio app in a Serve deployment by using `GradioIngress`, and scale it up through more replicas or more CPU/GPU resources.

Signed-off-by: Cindy Zhang <[email protected]>
@zcin
zcin deleted the gradio branch August 5, 2022 17:11
zcin added a commit that referenced this pull request Aug 5, 2022
simon-mo pushed a commit that referenced this pull request Aug 7, 2022
zcin added a commit that referenced this pull request Aug 8, 2022
…Applications (#26403)" (#27587)"

This reverts commit 64c550a.

Signed-off-by: Cindy Zhang <[email protected]>
Stefan-1313 pushed a commit to Stefan-1313/ray_mod that referenced this pull request Aug 18, 2022
…y-project#26403)

Integration between Ray Serve and Gradio. Users of Gradio can wrap their Gradio app in a Serve deployment by using `GradioIngress`, and scale it up through more replicas or more CPU/GPU resources.

Signed-off-by: Stefan van der Kleij <[email protected]>
Stefan-1313 pushed a commit to Stefan-1313/ray_mod that referenced this pull request Aug 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs An issue or change related to documentation serve Ray Serve Related Issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants