-
Notifications
You must be signed in to change notification settings - Fork 7.2k
[6/n] catalog ray serve env vars #60807
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?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,6 +30,9 @@ | |
| DEFAULT_REQUEST_ROUTING_STATS_TIMEOUT_S, | ||
| DEFAULT_TARGET_ONGOING_REQUESTS, | ||
| DEFAULT_UVICORN_KEEP_ALIVE_TIMEOUT_S, | ||
| RAY_SERVE_ROUTER_RETRY_BACKOFF_MULTIPLIER, | ||
| RAY_SERVE_ROUTER_RETRY_INITIAL_BACKOFF_S, | ||
| RAY_SERVE_ROUTER_RETRY_MAX_BACKOFF_S, | ||
| SERVE_LOGGER_NAME, | ||
| ) | ||
| from ray.serve._private.utils import validate_ssl_config | ||
|
|
@@ -248,6 +251,33 @@ class RequestRouterConfig(BaseModel): | |
| ), | ||
| ) | ||
|
|
||
| initial_backoff_s: float = Field( | ||
| default=RAY_SERVE_ROUTER_RETRY_INITIAL_BACKOFF_S, | ||
| description=( | ||
| "Initial backoff time (in seconds) before retrying to route a request " | ||
| "to a replica. Defaults to RAY_SERVE_ROUTER_RETRY_INITIAL_BACKOFF_S " | ||
| "environment variable, or 0.025 if not set." | ||
| ), | ||
| ) | ||
|
|
||
| backoff_multiplier: float = Field( | ||
| default=RAY_SERVE_ROUTER_RETRY_BACKOFF_MULTIPLIER, | ||
| description=( | ||
| "Multiplier applied to the backoff time after each retry. " | ||
| "Defaults to RAY_SERVE_ROUTER_RETRY_BACKOFF_MULTIPLIER " | ||
| "environment variable, or 2 if not set." | ||
| ), | ||
|
Comment on lines
264
to
266
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To make it clearer that the environment variable is being deprecated, consider rephrasing the description. For example: "Multiplier applied to the backoff time after each retry. Defaults to 2. This can be overridden by the deprecated `RAY_SERVE_ROUTER_RETRY_BACKOFF_MULTIPLIER` environment variable." description=(
"Multiplier applied to the backoff time after each retry. Defaults to 2. "
"This can be overridden by the deprecated `RAY_SERVE_ROUTER_RETRY_BACKOFF_MULTIPLIER` environment variable."
), |
||
| ) | ||
|
|
||
| max_backoff_s: float = Field( | ||
| default=RAY_SERVE_ROUTER_RETRY_MAX_BACKOFF_S, | ||
| description=( | ||
| "Maximum backoff time (in seconds) between retries. " | ||
| "Defaults to RAY_SERVE_ROUTER_RETRY_MAX_BACKOFF_S " | ||
| "environment variable, or 0.5 if not set." | ||
| ), | ||
|
Comment on lines
271
to
273
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To make it clearer that the environment variable is being deprecated, consider rephrasing the description. For example: "Maximum backoff time (in seconds) between retries. Defaults to 0.5. This can be overridden by the deprecated `RAY_SERVE_ROUTER_RETRY_MAX_BACKOFF_S` environment variable." description=(
"Maximum backoff time (in seconds) between retries. Defaults to 0.5. "
"This can be overridden by the deprecated `RAY_SERVE_ROUTER_RETRY_MAX_BACKOFF_S` environment variable."
), |
||
| ) | ||
|
|
||
| @validator("request_router_kwargs", always=True) | ||
| def request_router_kwargs_json_serializable(cls, v): | ||
| if isinstance(v, bytes): | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -123,6 +123,15 @@ message RequestRouterConfig { | |
|
|
||
| // kwargs which Ray Serve passes to the router class' initialize_state method. | ||
| bytes request_router_kwargs = 5; | ||
|
|
||
| // Initial backoff time (in seconds) before retrying to route a request. | ||
| double initial_backoff_s = 6; | ||
|
|
||
| // Multiplier applied to the backoff time after each retry. | ||
| double backoff_multiplier = 7; | ||
|
|
||
| // Maximum backoff time (in seconds) between retries. | ||
| double max_backoff_s = 8; | ||
cursor[bot] marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. PR lacks description explaining changesLow Severity To help reviewers, please ensure your PR includes:
See this list of PRs as examples for PRs that have gone above and beyond:
cursor[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
| //[End] ROUTING 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.
The description is a bit confusing. To make it clearer that the environment variable is being deprecated, consider rephrasing it. For example:
"Initial backoff time (in seconds) before retrying to route a request to a replica. Defaults to 0.025. This can be overridden by the deprecated `RAY_SERVE_ROUTER_RETRY_INITIAL_BACKOFF_S` environment variable."This applies to
backoff_multiplierandmax_backoff_sas well.