-
Notifications
You must be signed in to change notification settings - Fork 7.1k
deflake autoscaling basic with min aggregation #57784
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
Merged
Merged
Conversation
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
Signed-off-by: abrar <abrar@anyscale.com>
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Contributor
|
what's the reasoning behind the flakiness? |
akyang-anyscale
approved these changes
Oct 16, 2025
zcin
approved these changes
Oct 16, 2025
justinyeh1995
pushed a commit
to justinyeh1995/ray
that referenced
this pull request
Oct 20, 2025
flaky test ``` RAY_SERVE_HANDLE_AUTOSCALING_METRIC_PUSH_INTERVAL_S=0.1 \ RAY_SERVE_AGGREGATE_METRICS_AT_CONTROLLER=1 \ RAY_SERVE_COLLECT_AUTOSCALING_METRICS_ON_HANDLE=0 \ pytest -svvx "python/ray/serve/tests/test_autoscaling_policy.py::TestAutoscalingMetrics::test_basic[min]" ``` What I think is the likely cause When using `RAY_SERVE_AGGREGATE_METRICS_AT_CONTROLLER=1` with `min` aggregation: 1. **Replicas emit metrics at slightly different times** (even if just 10ms apart due to the timestamp bucketing/rounding) 2. **The merged timeseries reflects the ramp-up**: - At t=0: Maybe only replica 1 is reporting → total = 25 requests - At t=0.01: Replica 2 starts reporting → total = 40 requests - At t=0.02: Replica 3 starts reporting → total = 50 requests - etc. 3. **`min` aggregation captures the starting point**: - `aggregate_timeseries(..., aggregation_function="min")` takes the minimum value from the merged timeseries - This will always be one of those initial low values (like 25) when only a subset of replicas had started reporting - This value can never be ≥ 45, making the test inherently flaky Removing min from test fixture. I think a more robust solution is to keep the last report in the controller, generate the final time series using both reports, then clip the data and mid-point, then apply the aggregation function. Signed-off-by: abrar <abrar@anyscale.com>
xinyuangui2
pushed a commit
to xinyuangui2/ray
that referenced
this pull request
Oct 22, 2025
flaky test ``` RAY_SERVE_HANDLE_AUTOSCALING_METRIC_PUSH_INTERVAL_S=0.1 \ RAY_SERVE_AGGREGATE_METRICS_AT_CONTROLLER=1 \ RAY_SERVE_COLLECT_AUTOSCALING_METRICS_ON_HANDLE=0 \ pytest -svvx "python/ray/serve/tests/test_autoscaling_policy.py::TestAutoscalingMetrics::test_basic[min]" ``` What I think is the likely cause When using `RAY_SERVE_AGGREGATE_METRICS_AT_CONTROLLER=1` with `min` aggregation: 1. **Replicas emit metrics at slightly different times** (even if just 10ms apart due to the timestamp bucketing/rounding) 2. **The merged timeseries reflects the ramp-up**: - At t=0: Maybe only replica 1 is reporting → total = 25 requests - At t=0.01: Replica 2 starts reporting → total = 40 requests - At t=0.02: Replica 3 starts reporting → total = 50 requests - etc. 3. **`min` aggregation captures the starting point**: - `aggregate_timeseries(..., aggregation_function="min")` takes the minimum value from the merged timeseries - This will always be one of those initial low values (like 25) when only a subset of replicas had started reporting - This value can never be ≥ 45, making the test inherently flaky Removing min from test fixture. I think a more robust solution is to keep the last report in the controller, generate the final time series using both reports, then clip the data and mid-point, then apply the aggregation function. Signed-off-by: abrar <abrar@anyscale.com> Signed-off-by: xgui <xgui@anyscale.com>
elliot-barn
pushed a commit
that referenced
this pull request
Oct 23, 2025
flaky test ``` RAY_SERVE_HANDLE_AUTOSCALING_METRIC_PUSH_INTERVAL_S=0.1 \ RAY_SERVE_AGGREGATE_METRICS_AT_CONTROLLER=1 \ RAY_SERVE_COLLECT_AUTOSCALING_METRICS_ON_HANDLE=0 \ pytest -svvx "python/ray/serve/tests/test_autoscaling_policy.py::TestAutoscalingMetrics::test_basic[min]" ``` What I think is the likely cause When using `RAY_SERVE_AGGREGATE_METRICS_AT_CONTROLLER=1` with `min` aggregation: 1. **Replicas emit metrics at slightly different times** (even if just 10ms apart due to the timestamp bucketing/rounding) 2. **The merged timeseries reflects the ramp-up**: - At t=0: Maybe only replica 1 is reporting → total = 25 requests - At t=0.01: Replica 2 starts reporting → total = 40 requests - At t=0.02: Replica 3 starts reporting → total = 50 requests - etc. 3. **`min` aggregation captures the starting point**: - `aggregate_timeseries(..., aggregation_function="min")` takes the minimum value from the merged timeseries - This will always be one of those initial low values (like 25) when only a subset of replicas had started reporting - This value can never be ≥ 45, making the test inherently flaky Removing min from test fixture. I think a more robust solution is to keep the last report in the controller, generate the final time series using both reports, then clip the data and mid-point, then apply the aggregation function. Signed-off-by: abrar <abrar@anyscale.com> Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>
landscapepainter
pushed a commit
to landscapepainter/ray
that referenced
this pull request
Nov 17, 2025
flaky test ``` RAY_SERVE_HANDLE_AUTOSCALING_METRIC_PUSH_INTERVAL_S=0.1 \ RAY_SERVE_AGGREGATE_METRICS_AT_CONTROLLER=1 \ RAY_SERVE_COLLECT_AUTOSCALING_METRICS_ON_HANDLE=0 \ pytest -svvx "python/ray/serve/tests/test_autoscaling_policy.py::TestAutoscalingMetrics::test_basic[min]" ``` What I think is the likely cause When using `RAY_SERVE_AGGREGATE_METRICS_AT_CONTROLLER=1` with `min` aggregation: 1. **Replicas emit metrics at slightly different times** (even if just 10ms apart due to the timestamp bucketing/rounding) 2. **The merged timeseries reflects the ramp-up**: - At t=0: Maybe only replica 1 is reporting → total = 25 requests - At t=0.01: Replica 2 starts reporting → total = 40 requests - At t=0.02: Replica 3 starts reporting → total = 50 requests - etc. 3. **`min` aggregation captures the starting point**: - `aggregate_timeseries(..., aggregation_function="min")` takes the minimum value from the merged timeseries - This will always be one of those initial low values (like 25) when only a subset of replicas had started reporting - This value can never be ≥ 45, making the test inherently flaky Removing min from test fixture. I think a more robust solution is to keep the last report in the controller, generate the final time series using both reports, then clip the data and mid-point, then apply the aggregation function. Signed-off-by: abrar <abrar@anyscale.com>
Aydin-ab
pushed a commit
to Aydin-ab/ray-aydin
that referenced
this pull request
Nov 19, 2025
flaky test ``` RAY_SERVE_HANDLE_AUTOSCALING_METRIC_PUSH_INTERVAL_S=0.1 \ RAY_SERVE_AGGREGATE_METRICS_AT_CONTROLLER=1 \ RAY_SERVE_COLLECT_AUTOSCALING_METRICS_ON_HANDLE=0 \ pytest -svvx "python/ray/serve/tests/test_autoscaling_policy.py::TestAutoscalingMetrics::test_basic[min]" ``` What I think is the likely cause When using `RAY_SERVE_AGGREGATE_METRICS_AT_CONTROLLER=1` with `min` aggregation: 1. **Replicas emit metrics at slightly different times** (even if just 10ms apart due to the timestamp bucketing/rounding) 2. **The merged timeseries reflects the ramp-up**: - At t=0: Maybe only replica 1 is reporting → total = 25 requests - At t=0.01: Replica 2 starts reporting → total = 40 requests - At t=0.02: Replica 3 starts reporting → total = 50 requests - etc. 3. **`min` aggregation captures the starting point**: - `aggregate_timeseries(..., aggregation_function="min")` takes the minimum value from the merged timeseries - This will always be one of those initial low values (like 25) when only a subset of replicas had started reporting - This value can never be ≥ 45, making the test inherently flaky Removing min from test fixture. I think a more robust solution is to keep the last report in the controller, generate the final time series using both reports, then clip the data and mid-point, then apply the aggregation function. Signed-off-by: abrar <abrar@anyscale.com> Signed-off-by: Aydin Abiar <aydin@anyscale.com>
Future-Outlier
pushed a commit
to Future-Outlier/ray
that referenced
this pull request
Dec 7, 2025
flaky test ``` RAY_SERVE_HANDLE_AUTOSCALING_METRIC_PUSH_INTERVAL_S=0.1 \ RAY_SERVE_AGGREGATE_METRICS_AT_CONTROLLER=1 \ RAY_SERVE_COLLECT_AUTOSCALING_METRICS_ON_HANDLE=0 \ pytest -svvx "python/ray/serve/tests/test_autoscaling_policy.py::TestAutoscalingMetrics::test_basic[min]" ``` What I think is the likely cause When using `RAY_SERVE_AGGREGATE_METRICS_AT_CONTROLLER=1` with `min` aggregation: 1. **Replicas emit metrics at slightly different times** (even if just 10ms apart due to the timestamp bucketing/rounding) 2. **The merged timeseries reflects the ramp-up**: - At t=0: Maybe only replica 1 is reporting → total = 25 requests - At t=0.01: Replica 2 starts reporting → total = 40 requests - At t=0.02: Replica 3 starts reporting → total = 50 requests - etc. 3. **`min` aggregation captures the starting point**: - `aggregate_timeseries(..., aggregation_function="min")` takes the minimum value from the merged timeseries - This will always be one of those initial low values (like 25) when only a subset of replicas had started reporting - This value can never be ≥ 45, making the test inherently flaky Removing min from test fixture. I think a more robust solution is to keep the last report in the controller, generate the final time series using both reports, then clip the data and mid-point, then apply the aggregation function. Signed-off-by: abrar <abrar@anyscale.com> Signed-off-by: Future-Outlier <eric901201@gmail.com>
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.
flaky test
What I think is the likely cause
When using
RAY_SERVE_AGGREGATE_METRICS_AT_CONTROLLER=1withminaggregation:Replicas emit metrics at slightly different times (even if just 10ms apart due to the timestamp bucketing/rounding)
The merged timeseries reflects the ramp-up:
minaggregation captures the starting point:aggregate_timeseries(..., aggregation_function="min")takes the minimum value from the merged timeseriesRemoving min from test fixture.
I think a more robust solution is to keep the last report in the controller, generate the final time series using both reports, then clip the data and mid-point, then apply the aggregation function.