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] Refactor RayServeWrappedReplica to not be dynamically generated #42014

Merged
merged 3 commits into from
Dec 19, 2023

Conversation

edoakes
Copy link
Contributor

@edoakes edoakes commented Dec 19, 2023

Why are these changes needed?

This is a relic of a long time ago when this needed to be generated by a function. The excessive nesting makes reading the quote unnecessarily hard.

There are a lot of LOC changed here, but all I did was:

  • Move RayServeWrappedReplica to the top level in replica.py.
  • Import RayServeWrappedReplica directly to deployment_info.py instead of importing create_replica_wrapper.
  • Move the concurrency group name to constants.py.

Related issue number

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 added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • 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: Edward Oakes <[email protected]>
Signed-off-by: Edward Oakes <[email protected]>
@edoakes edoakes requested a review from a team December 19, 2023 15:57
@edoakes edoakes self-assigned this Dec 19, 2023
self._replica_tag = replica_tag
deployment_config = DeploymentConfig.from_proto_bytes(
deployment_config_proto_bytes
class RayServeWrappedReplica:
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add a docstring explaining what this class does?


init_args = cloudpickle.loads(serialized_init_args)
init_kwargs = cloudpickle.loads(serialized_init_kwargs)
# Set the controller name so that serve.connect() in the user's
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you update this comment?serve.connect() no longer exists.

self._replica_tag = replica_tag
deployment_config = DeploymentConfig.from_proto_bytes(
deployment_config_proto_bytes
class RayServeWrappedReplica:
Copy link
Contributor

Choose a reason for hiding this comment

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

I assume everything in this class is a pure move?

@edoakes edoakes merged commit 50b27ea into ray-project:master Dec 19, 2023
10 checks passed
vickytsang pushed a commit to ROCm/ray that referenced this pull request Jan 12, 2024
…ated (ray-project#42014)

* fix

Signed-off-by: Edward Oakes <[email protected]>

* oops

Signed-off-by: Edward Oakes <[email protected]>

---------

Signed-off-by: Edward Oakes <[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.

None yet

2 participants