-
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] Modify max_concurrency
in actor options to respect max_ongoing_requests
(#47681)
#48274
[Serve] Modify max_concurrency
in actor options to respect max_ongoing_requests
(#47681)
#48274
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>
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.
Nice work! were you able to test this e2e manually?
# 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 |
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.
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
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.
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. |
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.
# 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>
Yes tested with the script provided in the issue
Before:
After:
|
Signed-off-by: akyang-anyscale <alexyang@anyscale.com>
@akyang-anyscale lint is failing |
Signed-off-by: akyang-anyscale <alexyang@anyscale.com>
Signed-off-by: akyang-anyscale <alexyang@anyscale.com>
…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>
…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>
…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> Signed-off-by: mohitjain2504 <mohit.jain@dream11.com>
Why are these changes needed?
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'smax_concurrency
ifthe concurrency is not explicitly set. This is to prevent replica's
max_concurrency
from cappingmax_ongoing_requests
.Related issue number
Closes #47681
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.