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] Support setting deployment options via kwargs #14935

Merged
merged 8 commits into from
Mar 29, 2021

Conversation

edoakes
Copy link
Contributor

@edoakes edoakes commented Mar 25, 2021

Why are these changes needed?

See updated tests for details.

Less verbose UX, more closely matches Ray API.

Also clarifies the init_args behavior.

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 added this to the [serve] v2 API milestone Mar 25, 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.

I agree, the new API is more concise and Ray-like. I commented about one possible nit but otherwise looks great!

ray_actor_options: Optional[Dict] = None,
config: Optional[BackendConfig] = None) -> "Deployment":
def options(
self,
Copy link
Contributor

@architkulkarni architkulkarni Mar 28, 2021

Choose a reason for hiding this comment

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

Hadn't seen @classmethod before so I looked it up--it looks like it's idiomatic to for the first argument to be cls instead of self and to use cls.<...> instead of Deployment.<...> in the body of the method. I'm not sure if there's any concrete benefit to doing so though, unless we plan to subclass Deployment or change its name in the future.

Copy link
Contributor Author

@edoakes edoakes Mar 29, 2021

Choose a reason for hiding this comment

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

Ah yeah really good point, that would be much cleaner (it's weird to reference the class from within its own definition...)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

@edoakes edoakes merged commit e79d4cf into ray-project:master Mar 29, 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.

None yet

3 participants