Added backend API and CLI for custom autoscaling - #58081
Conversation
Signed-off-by: Vaishnavi Panchavati <vaishdho10@gmail.com>
Signed-off-by: Vaishnavi Panchavati <vaishdho10@gmail.com>
There was a problem hiding this comment.
Code Review
This pull request introduces a backend API and CLI for autoscaling observability, which is a valuable addition. The implementation is generally well-structured, including a new API endpoint, schema updates, and CLI extensions. The inclusion of a test case for the snapshot reading logic is also commendable. I have identified a few areas for improvement to enhance robustness and maintainability. Specifically, I've pointed out a potential ValueError in schema.py when handling timestamps, which could lead to a crash. I've also included suggestions for minor code cleanup in serve_head.py and a refactoring opportunity in scripts.py to improve readability. Overall, this is a solid contribution, and addressing these points will make the code even better.
Signed-off-by: Vaishnavi Panchavati <vaishdho10@gmail.com>
|
This pull request has been automatically marked as stale because it has not had You can always ask for help on our discussion forum or Ray's public slack channel. If you'd like to keep this open, just leave any comment, and the stale label will be removed. |
|
With #56225 merged, I will edit this logic and update the PR |
|
@vaishdho1 please resolve the merge conflicts and microcheck failures. |
Description
This PR introduces a backend API and CLI support for autoscaling observability. It reads and parses the autoscaling snapshot files (generated by #56225) to display detailed deployment level autoscaling status to the user
Changes:
serve_head.py: Added a GET route that reads from the snapshot files, converts into aDeploymentAutoscalingDetailcompatible schema and returns a JSON.schema.py: Added a helper constructorfrom_snapshotonDeploymentAutoscalingDetailto map raw snapshot data into a schema compliant object.scripts.py: Extended serve status with -v (and optional -d) to display deployment level autoscaling details entirely, per application or a specific deployment.Related issues
#56225 #55834
Checks
-sflag, i.e.,git commit -s) in this PR.scripts/format.shto lint the changes in this PR.doc/source/tune/api/under the corresponding.rstfile.Testing Strategy
Sample outputs
Steps