Skip to content

Commit 7b0f173

Browse files
committed
feat(serve): describe endpoint traffic as distributions over any window
Address review feedback on describe_endpoint_traffic (renamed from read_endpoint_traffic) and Workload.from_endpoint: - The window is relative (lookback back from end_time, seven days by default) or absolute (start_time to end_time). Times must be timezone-aware and are reported in UTC. - Input tokens, output tokens and concurrency are TrafficStats: min, p25, p50, p70, p80, p90, p95, p99, max (p100), mean and standard deviation. Token percentiles interpolate within the histograms' buckets. Concurrency's are over the window's hourly maximums, so its max is the busiest hour's. - Token histograms are listed per serving framework, so supporting another framework is one entry, and the result names the framework read. vLLM's are listed today. - Token metrics aren't read when the endpoint configuration turns detailed observability off, and the result reports the setting. Concurrency doesn't depend on it. - The result includes the variant's Data Capture prefix. Workload.from_endpoint replays the captured requests when the endpoint captures them (use_data_capture=False opts out), and otherwise builds a synthetic workload from the token metrics. - Workload.from_endpoint passes tokenizer, hf_token and the other workload parameters through **params.
1 parent 95d4a27 commit 7b0f173

4 files changed

Lines changed: 779 additions & 309 deletions

File tree

‎sagemaker-serve/src/sagemaker/serve/ai_inference_recommender/__init__.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141
from sagemaker.serve.ai_inference_recommender.secrets import Secret
4242
from sagemaker.serve.ai_inference_recommender.traffic import (
4343
EndpointTraffic,
44-
TokenStats,
45-
read_endpoint_traffic,
44+
TrafficStats,
45+
describe_endpoint_traffic,
4646
)
4747
from sagemaker.serve.ai_inference_recommender.workload import Workload
4848
from sagemaker.serve.ai_inference_recommender._model_builder_methods import (
@@ -62,12 +62,12 @@
6262
"PerformanceTarget",
6363
"RecommendationJob",
6464
"Secret",
65-
"TokenStats",
65+
"TrafficStats",
6666
"Workload",
6767
"WorkloadValidationError",
6868
"compare_benchmarks",
69+
"describe_endpoint_traffic",
6970
"list_benchmarks",
7071
"list_recommendations",
71-
"read_endpoint_traffic",
7272
"start_benchmark",
7373
]

0 commit comments

Comments
 (0)