Clean up bench_one_batch warning and simplify norm dispatch (#23110)

This commit is contained in:
Lianmin Zheng
2026-04-17 17:42:20 -07:00
committed by GitHub
parent 5f7aee726a
commit 9c47bbad13
2 changed files with 24 additions and 28 deletions
@@ -35,7 +35,10 @@ def get_cache_tokens_from_metrics(url: str) -> Optional[tuple]:
"""
try:
response = requests.get(url + "/metrics", timeout=5)
response.raise_for_status()
try:
response.raise_for_status()
except requests.exceptions.HTTPError:
return None
# Parse Prometheus text format
# Looking for: sglang:cached_tokens_total{...} <value>