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] Introduce context.py and client.py #24067

Merged
merged 22 commits into from
Apr 21, 2022

Conversation

shrekris-anyscale
Copy link
Contributor

@shrekris-anyscale shrekris-anyscale commented Apr 21, 2022

Why are these changes needed?

Serve stores context state, including the _INTERNAL_REPLICA_CONTEXT and the _global_client in api.py. However, these data structures are referenced throughout the codebase, causing circular dependencies. This change introduces two new files:

  • context.py
    • Intended to expose process-wide state to internal Serve code as well as api.py
    • Stores the _INTERNAL_REPLICA_CONTEXT and the _global_client global variables
  • client.py
    • Stores the definition for the Serve Client object, now called the ServeControllerClient

Related issue number

N/A

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
    • This change relies on existing tests only.

@shrekris-anyscale shrekris-anyscale changed the title [serve] Introduce context.py and client.py [WIP] [serve] Introduce context.py and client.py Apr 21, 2022
Copy link
Contributor

@edoakes edoakes left a comment

Choose a reason for hiding this comment

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

LGTM assuming all the copy-pasted logic is unmodified

@edoakes
Copy link
Contributor

edoakes commented Apr 21, 2022

@edoakes edoakes added the @author-action-required The PR author is responsible for the next step. Remove tag to send back to the reviewer. label Apr 21, 2022
@shrekris-anyscale shrekris-anyscale changed the title [WIP] [serve] Introduce context.py and client.py [serve] Introduce context.py and client.py Apr 21, 2022
@shrekris-anyscale shrekris-anyscale removed the @author-action-required The PR author is responsible for the next step. Remove tag to send back to the reviewer. label Apr 21, 2022
@edoakes edoakes merged commit b51d0aa into ray-project:master Apr 21, 2022
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.

None yet

2 participants