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

[serve] Change Gradio integration to take a builder function to avoid serialization issues #31619

Merged
merged 15 commits into from
Jan 20, 2023

Conversation

zcin
Copy link
Contributor

@zcin zcin commented Jan 12, 2023

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

Why are these changes needed?

New versions of Gradio make Gradio objects un-serializable in Ray. This makes it impossible to directly pass in a Gradio object to GradioIngress, so to avoid this the API is changed to accept a builder function that constructs the Gradio object on the Ray cluster.

Related issue number

Closes #31161

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

Signed-off-by: Cindy Zhang <[email protected]>
Signed-off-by: Cindy Zhang <[email protected]>
Signed-off-by: Cindy Zhang <[email protected]>
Signed-off-by: Cindy Zhang <[email protected]>
Signed-off-by: Cindy Zhang <[email protected]>
Signed-off-by: Cindy Zhang <[email protected]>
Signed-off-by: Cindy Zhang <[email protected]>
Signed-off-by: Cindy Zhang <[email protected]>
Signed-off-by: Cindy Zhang <[email protected]>
Signed-off-by: Cindy Zhang <[email protected]>
Signed-off-by: Cindy Zhang <[email protected]>
@zcin zcin marked this pull request as ready for review January 18, 2023 22:51
@sihanwang41
Copy link
Contributor

The fix looks good to me. General question: does it mean we will not support Gradio 3.5 in this case?

@zcin
Copy link
Contributor Author

zcin commented Jan 19, 2023

The fix looks good to me. General question: does it mean we will not support Gradio 3.5 in this case?

No, earlier versions should still be supported. We are just sidestepping the serialization issue by changing the API of our integration - functionality is still the same, the Gradio object is just built remotely on the cluster instead of locally to avoid serialization.

@zcin
Copy link
Contributor Author

zcin commented Jan 19, 2023

Test linux://rllib:test_memory_leak_a3c is flaky on master, seems unrelated.

@sihanwang41
Copy link
Contributor

The fix looks good to me. General question: does it mean we will not support Gradio 3.5 in this case?

No, earlier versions should still be supported. We are just sidestepping the serialization issue by changing the API of our integration - functionality is still the same, the Gradio object is just built remotely on the cluster instead of locally to avoid serialization.

@sihanwang41 sihanwang41 reopened this Jan 19, 2023
@sihanwang41
Copy link
Contributor

sorry, click wrong button....

@edoakes edoakes merged commit b18c8fd into ray-project:master Jan 20, 2023
@zcin zcin deleted the gradio-serialize branch January 20, 2023 18:48
andreapiso pushed a commit to andreapiso/ray that referenced this pull request Jan 22, 2023
… serialization issues (ray-project#31619)

New versions of Gradio make Gradio objects un-serializable in Ray. This makes it impossible to directly pass in a Gradio object to `GradioIngress`, so to avoid this the API is changed to accept a builder function that constructs the Gradio object on the Ray cluster.

Signed-off-by: Andrea Pisoni <[email protected]>
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.

[Serve] error running Gradio Serve example
3 participants