-
Notifications
You must be signed in to change notification settings - Fork 6.9k
[serve] Fix bug with 'proxy_location' set for 'serve run' CLI command + discrepancy fix in Python API 'serve.start' function #57622
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: axreldable <aleksei.starikov.ax@gmail.com>
Signed-off-by: axreldable <aleksei.starikov.ax@gmail.com>
…' method Signed-off-by: axreldable <aleksei.starikov.ax@gmail.com>
3de646d
to
3cdf062
Compare
Signed-off-by: axreldable <aleksei.starikov.ax@gmail.com>
3cdf062
to
b4c6107
Compare
_system_config={"metrics_report_interval_ms": 1000, "task_retry_delay_ms": 50}, | ||
) | ||
serve.start( | ||
proxy_location=ProxyLocation.HeadOnly, |
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 is the current value which is used implicitly.
elif isinstance(http_options, dict): | ||
http_options = HTTPOptions(**http_options) | ||
http_options.location = ProxyLocation._to_deployment_mode(proxy_location) | ||
return http_options |
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.
Bug: Proxy Location Conversion Error
The _prepare_http_options
function is missing the string-to-ProxyLocation
enum conversion for proxy_location
. This logic was present in the original start()
function but removed, causing runtime errors when proxy_location
is passed as a string to ProxyLocation._to_deployment_mode
.
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 transformation was redundant.
Why are these changes needed?
serve run
CLI command ignoresproxy_location
from config and uses default valueEveryNode
.Steps to reproduce:
Execute:
proxy_location
in theconfig.yaml
: EveryNode -> DisabledOutput:
serve.start
function in Python API sets differenthttp_options.location
depending on ifhttp_options
is provided.Steps to reproduce:
Execute:
Output:
It changes current behavior in the following ways:
serve run
CLI command respectsproxy_location
parameter from config instead of using the hardcodedEveryNode
.serve.start
function in Python API stops using the defaultHeadOnly
in case of emptyproxy_location
and providedhttp_options
dictionary withoutlocation
specified.Related issue number
Aims to simplify changes in the PR: #56507
Checks
git commit -s
) in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.