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] Deprecate client-based API in favor of process-wide singleton #14696

Merged
merged 10 commits into from
Mar 17, 2021

Conversation

edoakes
Copy link
Contributor

@edoakes edoakes commented Mar 16, 2021

Why are these changes needed?

Deprecates the Client-based API in favor of directly calling API calls like serve.create_backend(). We made an overcorrection here from the previous API that made things just more verbose/annoying. This change is a good middle ground: users can start temporary clusters attached to the lifetime of their session by calling serve.start() in the code. Otherwise, they can start a long-lived session with serve.start(detached=True). API calls if neither of these are made implicitly call serve.connect() to connect to a long-lived session.

This PR still supports the old API but prints a warning message telling people to change their usage. The nice thing here is all they should need to do is s/client\./serve./g.

Related issue number

Checks

  • 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 :(

@edoakes edoakes changed the title [WIP] Deprecate client-based API [serve] Deprecate client-based API in favor of process-wide singleton Mar 16, 2021
Copy link
Contributor

@architkulkarni architkulkarni left a comment

Choose a reason for hiding this comment

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

Looks good!

Co-authored-by: architkulkarni <architkulkarni@users.noreply.github.com>
@edoakes edoakes merged commit aab7ccc into ray-project:master Mar 17, 2021
@edoakes edoakes added this to the [serve] v2 API milestone Mar 19, 2021
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.

3 participants