Repository navigation
Commit 95d4a27
committed
feat(serve): size workloads from an endpoint's traffic
Add read_endpoint_traffic(), which reads the traffic one model on an
endpoint served over the last 1 to 7 days: the busiest hour's concurrency
for the whole deployment (ConcurrentRequestsPerCopy or
ConcurrentRequestsPerModel times the current copies or instances) and,
with detailed observability on, the request count and the mean and
standard deviation of the prompt and generated tokens of the requests a
vLLM container completed. The token histograms are read through
CloudWatch's Prometheus-compatible query API with the session's
credentials.
The histograms are cumulative, so each series' traffic in the window is
its newest snapshot in the window less its last one before it, read with
one instant query a day.
An adapter's requests run in its base component's container, which
publishes the concurrency and the token histograms for them, so an
adapter reads its base component, and finding the component skips
adapters.
Add Workload.from_endpoint(), which builds a synthetic workload from
them, so a benchmark or recommendation job can be sized from what an
endpoint serves today.1 parent 94899a9 commit 95d4a27
4 files changed
Lines changed: 1089 additions & 0 deletions
File tree
- sagemaker-serve
- src/sagemaker/serve/ai_inference_recommender
- tests/unit/test_ai_inference_recommender
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
42 | 47 | | |
43 | 48 | | |
44 | 49 | | |
| |||
51 | 56 | | |
52 | 57 | | |
53 | 58 | | |
| 59 | + | |
54 | 60 | | |
55 | 61 | | |
56 | 62 | | |
57 | 63 | | |
58 | 64 | | |
| 65 | + | |
59 | 66 | | |
60 | 67 | | |
61 | 68 | | |
62 | 69 | | |
63 | 70 | | |
| 71 | + | |
64 | 72 | | |
65 | 73 | | |
0 commit comments