[Serve] Modify max_concurrency in actor options to respect max_ongoing_requests (#47681)#48274
Merged
zcin merged 10 commits intoray-project:masterfrom Oct 30, 2024
Merged
Conversation
…ng_requests Signed-off-by: akyang-anyscale <alexyang@anyscale.com>
Signed-off-by: akyang-anyscale <alexyang@anyscale.com>
max_concurrency in actor options to respect max_ongoing_requests (#47681)max_concurrency in actor options to respect max_ongoing_requests (https://github.com/ray-project/ray/issues/47681)
max_concurrency in actor options to respect max_ongoing_requests (https://github.com/ray-project/ray/issues/47681)max_concurrency in actor options to respect max_ongoing_requests (#47681)
Signed-off-by: akyang-anyscale <alexyang@anyscale.com>
Signed-off-by: akyang-anyscale <alexyang@anyscale.com>
f64fe8c to
d4b81e3
Compare
Signed-off-by: akyang-anyscale <alexyang@anyscale.com>
zcin
reviewed
Oct 29, 2024
| # unintentional behavior, use `max_ongoing_requests` to override | ||
| # the Actor's `max_concurrency` if it is not explicitly set. | ||
| if ( | ||
| "max_concurrency" not in actor_options |
Contributor
There was a problem hiding this comment.
ray_actor_options is limited to a structured schema RayActorOptionsSchema, which doesn't allow max_concurrency, so I think you don't need to check for max_concurrency
Contributor
Author
There was a problem hiding this comment.
yeah this was trying to future proof
python/ray/_private/ray_constants.py
Outdated
| # Default max_concurrency option in @ray.remote for threaded actors. | ||
| DEFAULT_MAX_CONCURRENCY_THREADED = 1 | ||
|
|
||
| # Default max_concurrency option in @ray.remote for aysnc actors. |
Contributor
There was a problem hiding this comment.
Suggested change
| # Default max_concurrency option in @ray.remote for aysnc actors. | |
| # Default max_concurrency option in @ray.remote for async actors. |
Signed-off-by: akyang-anyscale <alexyang@anyscale.com>
Contributor
Author
|
Yes tested with the script provided in the issue Before: After: |
Signed-off-by: akyang-anyscale <alexyang@anyscale.com>
zcin
approved these changes
Oct 29, 2024
Contributor
|
@akyang-anyscale lint is failing |
Signed-off-by: akyang-anyscale <alexyang@anyscale.com>
Signed-off-by: akyang-anyscale <alexyang@anyscale.com>
JP-sDEV
pushed a commit
to JP-sDEV/ray
that referenced
this pull request
Nov 14, 2024
…oing_requests` (ray-project#47681) (ray-project#48274) ## Why are these changes needed? <!-- Please give a short summary of the change and the problem this solves. --> This PR modifies the actor_options used when deploying replicas. Deployment will use the configured `max_ongoing_requests` attribute of the deployment config as the replica's `max_concurrency` if the concurrency is not explicitly set. This is to prevent replica's `max_concurrency` from capping `max_ongoing_requests`. ## Related issue number <!-- For example: "Closes ray-project#1234" --> Closes ray-project#47681 Signed-off-by: akyang-anyscale <alexyang@anyscale.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why are these changes needed?
This PR modifies the actor_options used when deploying replicas. Deployment will use the configured
max_ongoing_requestsattribute of the deployment config as the replica'smax_concurrencyifthe concurrency is not explicitly set. This is to prevent replica's
max_concurrencyfrom cappingmax_ongoing_requests.Related issue number
Closes #47681
Checks
git commit -s) in this PR.scripts/format.shto lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/under thecorresponding
.rstfile.