-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
Conversation
Co-authored-by: Edward Oakes <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@simon-mo PTAL
python/ray/serve/api.py
Outdated
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 |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
Why are these changes needed?
#23157 and #23232 introduce an
Application
object with an immutable deployment dictionary. This change introducesset_options()
, a deployment method that mutates its attributes. This allows anApplication
's deployments to be edited after initialization.Related issue number
N/A
Checks
scripts/format.sh
to lint the changes in this PR.test_api.py
.