-
Notifications
You must be signed in to change notification settings - Fork 6k
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] Don't change deployment status when autoscaling #36520
Conversation
Signed-off-by: Cindy Zhang <cindyzyx9@gmail.com>
Signed-off-by: Cindy Zhang <cindyzyx9@gmail.com>
@@ -1289,6 +1289,19 @@ def _set_target_state(self, target_info: DeploymentInfo) -> None: | |||
|
|||
logger.info(f"Deploying new version of deployment {self._name}.") | |||
|
|||
def _set_target_state_autoscaling(self, num_replicas: int) -> None: | |||
"""Update the target number of replicas based on an autoscaling decision.""" |
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.
please update this comment to indicate why we need a separate codepath and what is different from _set_target_state
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.
Added comments!
def wait_for_condition_raise( | ||
condition_predictor, timeout=10, retry_interval_ms=100, **kwargs: Any | ||
): | ||
"""Wait until a condition is met. If exception occurs, raise it.""" |
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.
can you just make this behavior a flag passed to existing wait_for_condition
? would reduce the likelihood of someone else rewriting this themselves in the future
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 point, I've added this as a parameter to wait_for_condition
Signed-off-by: Cindy Zhang <cindyzyx9@gmail.com>
Signed-off-by: Cindy Zhang <cindyzyx9@gmail.com>
Signed-off-by: Cindy Zhang <cindyzyx9@gmail.com>
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.
sync offline, one change needed to always set version (new_info.version = self._target_state.version.code_version
) . approval for unblocking! LGTM
Thanks @sihanwang41, I've addressed your comment! @edoakes Tests are passing, should be ready to merge! |
…36520) The deployment state UPDATING should only be used during redeployment. Right now the state is updating during autoscaling, which can be confusing for users. This PR makes it so that the state doesn't change during autoscaling. This usually means that a deployment's status will remain HEALTHY while it's autoscaling. Signed-off-by: e428265 <arvind.chandramouli@lmco.com>
Why are these changes needed?
The deployment state UPDATING should only be used during redeployment. Right now the state is updating during autoscaling, which can be confusing for users. This PR makes it so that the state doesn't change during autoscaling. This usually means that a deployment's status will remain HEALTHY while it's autoscaling.
Related issue number
Closes #35948
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.