Commit a58d6e0
[serve] Transform replica level metrics to AutoScalingContext constructor args (ray-project#57202)
## Changes
1. Wire up the AutoScalingContext constructor args to make metrics
readable in the custom AutoScalingPolicy function.
2. dropped `requests_per_replica` since its expensive to compute
3. renamed `queued_requests` to `total_queued_requests` for consistency
with `total_num_requests`
4. added `total_running_requests`
5. added tests assert new fields are populated correctly
6. run custom metrics tests with
`RAY_SERVE_AGGREGATE_METRICS_AT_CONTROLLER` = 0 and 1
7. updated docs
---------
Signed-off-by: abrar <abrar@anyscale.com>
Signed-off-by: Arthur Leung <arcyleung@gmail.com>
Signed-off-by: Arthur Leung <arcyleung+github@gmail.com>
Co-authored-by: abrar <abrar@anyscale.com>
Co-authored-by: Arthur Leung <arcyleung@gmail.com>1 parent 54207a4 commit a58d6e0
File tree
11 files changed
+380
-121
lines changed- doc/source/serve
- advanced-guides
- doc_code
- python/ray/serve
- _private
- tests
- unit
11 files changed
+380
-121
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
668 | 668 | | |
669 | 669 | | |
670 | 670 | | |
671 | | - | |
672 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
24 | | - | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
42 | | - | |
43 | | - | |
44 | | - | |
| 43 | + | |
| 44 | + | |
45 | 45 | | |
46 | | - | |
47 | | - | |
48 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
0 commit comments