[misc] Add sglang.bench_one_batch deprecation shim (#29082)

This commit is contained in:
Liangsheng Yin
2026-06-23 14:57:35 -07:00
committed by GitHub
parent f74a1722e6
commit 11e7c9e0e6
2 changed files with 27 additions and 1 deletions
+22
View File
@@ -0,0 +1,22 @@
"""Deprecated import path for ``sglang.benchmark.one_batch``.
``python -m sglang.bench_one_batch`` and ``from sglang.bench_one_batch import ...``
still work, but the implementation now lives in ``sglang.benchmark.one_batch``.
Update references to the new path.
"""
import warnings
from sglang.benchmark.one_batch import * # noqa: F401,F403
from sglang.benchmark.one_batch import cli_main
warnings.warn(
"`sglang.bench_one_batch` is deprecated and will be removed in a future "
"release; use `sglang.benchmark.one_batch` instead "
"(e.g. `python -m sglang.benchmark.one_batch`).",
DeprecationWarning,
stacklevel=2,
)
if __name__ == "__main__":
cli_main()