[Data] Relaxing DefaultActorAutoscaler constraint to keep autoscaling #61917
Conversation
There was a problem hiding this comment.
Code Review
This pull request successfully relaxes the DefaultActorAutoscaler constraint, allowing the autoscaler to scale up based on utilization even when there are sufficient free task slots to handle pending inputs. This change aligns with the goal of improving concurrency and addressing limitations with max_tasks_in_flight_per_actor settings. The corresponding test case has been updated to reflect this new behavior, ensuring the logic is correctly applied.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
| # Do not scale up if either | ||
| # - Actor Pool is at max size already | ||
| # - Op is throttled (ie exceeding allocated resource quota) | ||
| elif actor_pool.current_size() >= actor_pool.max_size(): |
There was a problem hiding this comment.
Unused function left behind after removing its caller
Low Severity
The _estimate_expected_tasks function is now completely dead code. It was only called from the removed "enough free task slots" check in _derive_target_scaling_config, and a codebase-wide search confirms it has zero remaining callers — no production code or test code references it. The sibling function _estimate_total_available_task_slots is similarly unused in production but is at least still exercised by tests in test_actor_pool_map_operator.py.
There was a problem hiding this comment.
+1 remove if dead code
Signed-off-by: Alexey Kudinkin <ak@anyscale.com>
Signed-off-by: Alexey Kudinkin <ak@anyscale.com>
Signed-off-by: Alexey Kudinkin <ak@anyscale.com>
74f323d to
4c01a5a
Compare
…ng (ray-project#61917) ## Description Currently, `DefaultActorAutoscaler` limits autoscaling if current number of task slots in the pool (ie `actor-pool-size x max_tasks_in_flight_per_actor`) are more than the pending inputs available. This is unnecessarily limiting autoscaling: - We want to increase actual concurrency, which is measured by actor pool utilization. This check is outdated and is rudimentary to the new Autoscaler architecture. Case in point: If you increase `max_tasks_in_flight_per_actor` to improve locality then you essentially disabling ability to autoscale. ## Related issues > Link related issues: "Fixes ray-project#1234", "Closes ray-project#1234", or "Related to ray-project#1234". ## Additional information > Optional: Add implementation details, API changes, usage examples, screenshots, etc. --------- Signed-off-by: Alexey Kudinkin <ak@anyscale.com>
…ng (ray-project#61917) ## Description Currently, `DefaultActorAutoscaler` limits autoscaling if current number of task slots in the pool (ie `actor-pool-size x max_tasks_in_flight_per_actor`) are more than the pending inputs available. This is unnecessarily limiting autoscaling: - We want to increase actual concurrency, which is measured by actor pool utilization. This check is outdated and is rudimentary to the new Autoscaler architecture. Case in point: If you increase `max_tasks_in_flight_per_actor` to improve locality then you essentially disabling ability to autoscale. ## Related issues > Link related issues: "Fixes ray-project#1234", "Closes ray-project#1234", or "Related to ray-project#1234". ## Additional information > Optional: Add implementation details, API changes, usage examples, screenshots, etc. --------- Signed-off-by: Alexey Kudinkin <ak@anyscale.com>


Description
Currently,
DefaultActorAutoscalerlimits autoscaling if current number of task slots in the pool (ieactor-pool-size x max_tasks_in_flight_per_actor) are more than the pending inputs available.This is unnecessarily limiting autoscaling:
Case in point: If you increase
max_tasks_in_flight_per_actorto improve locality then you essentially disabling ability to autoscale.Related issues
Additional information