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] Implement set_options #23265

Merged
merged 4 commits into from
Mar 18, 2022

Conversation

shrekris-anyscale
Copy link
Contributor

@shrekris-anyscale shrekris-anyscale commented Mar 17, 2022

Why are these changes needed?

#23157 and #23232 introduce an Application object with an immutable deployment dictionary. This change introduces set_options(), a deployment method that mutates its attributes. This allows an Application's deployments to be edited after initialization.

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
    • Unit tests
      • New unit tests are added to test_api.py.

python/ray/serve/api.py Outdated Show resolved Hide resolved
@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 Mar 17, 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 Mar 17, 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.

@simon-mo PTAL

Comment on lines 1308 to 1327
self._config.num_replicas = validated._config.num_replicas
self._config.user_config = validated._config.user_config
self._config.max_concurrent_queries = validated._config.max_concurrent_queries
self._func_or_class = validated._func_or_class
self._name = validated._name
self._version = validated._version
self._prev_version = validated._prev_version
self._init_args = validated._init_args
self._init_kwargs = validated._init_kwargs
self._route_prefix = validated._route_prefix
self._ray_actor_options = validated._ray_actor_options
self._config.autoscaling_config = validated._config.autoscaling_config
self._config.graceful_shutdown_wait_loop_s = (
validated._config.graceful_shutdown_wait_loop_s
)
self._config.graceful_shutdown_timeout_s = (
validated._config.graceful_shutdown_timeout_s
)
self._config.health_check_period_s = validated._config.health_check_period_s
self._config.health_check_timeout_s = validated._config.health_check_timeout_s
Copy link
Contributor

Choose a reason for hiding this comment

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

just self._config = validated._config?

Copy link
Contributor

Choose a reason for hiding this comment

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

and the rest of stuff

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea– I changed it.

@simon-mo simon-mo merged commit 1b30bfa into ray-project:master Mar 18, 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.

3 participants