-
Notifications
You must be signed in to change notification settings - Fork 415
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] Minor fix on bootstrap_done
#3075
Conversation
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.
Thanks for the fix @MaoZiming!
@@ -183,6 +184,7 @@ def _get_desired_num_replicas(self) -> int: | |||
# is not enabled, i.e. self.target_qps_per_replica is None. | |||
# In this case, self.target_num_replicas will be min_replicas. | |||
if self.target_qps_per_replica is None: | |||
self.bootstrap_done = True |
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.
This seems having no effect, as this if condition will always short circuit the following calculation?
If it is the case, might be good to have a comment.
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.
This matters earlier in a subtle case where we do not set self.bootstrap_done=False
during update.
I think since we decide to do that, as you mentioned, this will not have effect.
Co-authored-by: Zhanghao Wu <zhanghao.wu@outlook.com>
Tested (run the relevant ones):
bash format.sh
pytest tests/test_smoke.py
pytest tests/test_smoke.py::test_fill_in_the_name
bash tests/backward_comaptibility_tests.sh