Skip to content

[serve] Added validation for lookback_period_s > metrics interval and updated docs#59456

Merged
abrarsheikh merged 6 commits intoray-project:masterfrom
vaishdho1:lookback-period-metric-interval
Dec 16, 2025
Merged

[serve] Added validation for lookback_period_s > metrics interval and updated docs#59456
abrarsheikh merged 6 commits intoray-project:masterfrom
vaishdho1:lookback-period-metric-interval

Conversation

@vaishdho1
Copy link
Contributor

Description

  • Added config validation to ensure look_back_period_s is greater than metrics_interval_s in AutoscalingConfig.
  • Updated autoscaling docs to clarify the relationship between delays and metric push intervals.

Related issues

Fixes #57714

Additional information

  • Updated documentation around the interaction between metrics push interval and autoscaling delays: Delays are enforced purely via the control loop interval and delay parameters, while the push interval bounds how quickly the autoscaler can see metric changes.

…action

Signed-off-by: Vaishnavi Panchavati <vaishdho10@gmail.com>
Signed-off-by: Vaishnavi Panchavati <vaishdho10@gmail.com>
@vaishdho1 vaishdho1 requested review from a team as code owners December 15, 2025 23:27
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds a validation to ensure look_back_period_s is greater than metrics_interval_s in AutoscalingConfig and updates the documentation to clarify the relationship between autoscaling delays and metric push intervals. The code changes are correct and the tests are adequate. However, I found one issue where the documentation was not fully updated to reflect the new, stricter validation rule. Please see my comment for details.

Signed-off-by: Vaishnavi Panchavati <vaishdho10@gmail.com>
@ray-gardener ray-gardener bot added serve Ray Serve Related Issue docs An issue or change related to documentation community-contribution Contributed by the community labels Dec 16, 2025
@abrarsheikh abrarsheikh added the go add ONLY when ready to merge, run all tests label Dec 16, 2025
Signed-off-by: Vaishnavi Panchavati <vaishdho10@gmail.com>
Comment on lines +530 to +533
raise ValueError(
f"look_back_period_s ({v}) must be greater than "
f"metrics_interval_s ({metrics_interval_s})!"
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i am thinking failing loudly may be too aggressive. How about we raise warning for now, then in 2 releases start raising exception.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Signed-off-by: Vaishnavi Panchavati <vaishdho10@gmail.com>
Signed-off-by: Vaishnavi Panchavati <vaishdho10@gmail.com>
@abrarsheikh abrarsheikh merged commit 17f24ec into ray-project:master Dec 16, 2025
5 of 6 checks passed
@vaishdho1 vaishdho1 deleted the lookback-period-metric-interval branch December 17, 2025 00:57
cszhu pushed a commit that referenced this pull request Dec 17, 2025
…nd updated docs (#59456)

## Description
- Added config validation to ensure `look_back_period_s` is greater than
`metrics_interval_s` in `AutoscalingConfig`.
- Updated autoscaling docs to clarify the relationship between delays
and metric push intervals.

## Related issues
Fixes #57714

## Additional information
- Updated documentation around the interaction between metrics push
interval and autoscaling delays: Delays are enforced purely via the
control loop interval and delay parameters, while the push interval
bounds how quickly the autoscaler can see metric changes.

---------

Signed-off-by: Vaishnavi Panchavati <vaishdho10@gmail.com>
zzchun pushed a commit to zzchun/ray that referenced this pull request Dec 18, 2025
…nd updated docs (ray-project#59456)

## Description
- Added config validation to ensure `look_back_period_s` is greater than
`metrics_interval_s` in `AutoscalingConfig`.
- Updated autoscaling docs to clarify the relationship between delays
and metric push intervals.

## Related issues
Fixes ray-project#57714

## Additional information
- Updated documentation around the interaction between metrics push
interval and autoscaling delays: Delays are enforced purely via the
control loop interval and delay parameters, while the push interval
bounds how quickly the autoscaler can see metric changes.

---------

Signed-off-by: Vaishnavi Panchavati <vaishdho10@gmail.com>
Yicheng-Lu-llll pushed a commit to Yicheng-Lu-llll/ray that referenced this pull request Dec 22, 2025
…nd updated docs (ray-project#59456)

## Description
- Added config validation to ensure `look_back_period_s` is greater than
`metrics_interval_s` in `AutoscalingConfig`.
- Updated autoscaling docs to clarify the relationship between delays
and metric push intervals.

## Related issues
Fixes ray-project#57714

## Additional information
- Updated documentation around the interaction between metrics push
interval and autoscaling delays: Delays are enforced purely via the
control loop interval and delay parameters, while the push interval
bounds how quickly the autoscaler can see metric changes.

---------

Signed-off-by: Vaishnavi Panchavati <vaishdho10@gmail.com>
peterxcli pushed a commit to peterxcli/ray that referenced this pull request Feb 25, 2026
…nd updated docs (ray-project#59456)

## Description
- Added config validation to ensure `look_back_period_s` is greater than
`metrics_interval_s` in `AutoscalingConfig`.
- Updated autoscaling docs to clarify the relationship between delays
and metric push intervals.

## Related issues
Fixes ray-project#57714

## Additional information
- Updated documentation around the interaction between metrics push
interval and autoscaling delays: Delays are enforced purely via the
control loop interval and delay parameters, while the push interval
bounds how quickly the autoscaler can see metric changes.

---------

Signed-off-by: Vaishnavi Panchavati <vaishdho10@gmail.com>
Signed-off-by: peterxcli <peterxcli@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution Contributed by the community docs An issue or change related to documentation go add ONLY when ready to merge, run all tests serve Ray Serve Related Issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Serve] validate lookback period > metric interval

3 participants