{"record":{"id":"22b4396ae6b7843e","repo":"sgl-project/sglang","slug":"sglang-bench-one-batch-server-is-deprecated-and","errorCode":null,"errorMessage":"`sglang.bench_one_batch_server` is deprecated and will be removed in a future release; use `sglang.benchmark.one_batch_server` instead (e.g. `python -m sglang.benchmark.one_batch_server`).","messagePattern":"`sglang\\.bench_one_batch_server` is deprecated and will be removed in a future release; use `sglang\\.benchmark\\.one_batch_server` instead \\(e\\.g\\. `python -m sglang\\.benchmark\\.one_batch_server`\\)\\.","errorType":"console","errorClass":"FutureWarning","httpStatus":null,"severity":"warning","filePath":"python/sglang/bench_one_batch_server.py","lineNumber":14,"sourceCode":"\"\"\"Deprecated import path for ``sglang.benchmark.one_batch_server``.\n\n``python -m sglang.bench_one_batch_server`` and\n``from sglang.bench_one_batch_server import ...`` still work, but the\nimplementation now lives in ``sglang.benchmark.one_batch_server``.\nUpdate references to the new path.\n\"\"\"\n\nimport warnings\n\nfrom sglang.benchmark.one_batch_server import *  # noqa: F401,F403\nfrom sglang.benchmark.one_batch_server import cli_main\n\nwarnings.warn(\n    \"`sglang.bench_one_batch_server` is deprecated and will be removed in a \"\n    \"future release; use `sglang.benchmark.one_batch_server` instead \"\n    \"(e.g. `python -m sglang.benchmark.one_batch_server`).\",\n    FutureWarning,\n    stacklevel=1,\n)\n\nif __name__ == \"__main__\":\n    cli_main()\n","sourceCodeStart":1,"sourceCodeEnd":24,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/bench_one_batch_server.py#L1-L24","documentation":"FutureWarning from the compatibility shim sglang.bench_one_batch_server: the server-based one-batch benchmark moved to sglang.benchmark.one_batch_server. The shim re-exports the new module's API and cli_main and warns at import.","triggerScenarios":"Running python -m sglang.bench_one_batch_server or importing the old module path.","commonSituations":"Legacy scripts or documentation invoking the pre-reorganization benchmark path after a sglang upgrade.","solutions":["Run python -m sglang.benchmark.one_batch_server","Change imports to sglang.benchmark.one_batch_server","Suppress with warnings filters only as a short-term stopgap"],"exampleFix":"# before\npython -m sglang.bench_one_batch_server --model ...\n# after\npython -m sglang.benchmark.one_batch_server --model ...","handlingStrategy":"fallback","validationCode":"import importlib\nbench = importlib.import_module(\"sglang.benchmark.one_batch_server\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Move to sglang.benchmark.one_batch_server now; the shim will be deleted","Grep repos for 'bench_one_batch_server' after upgrades"],"tags":["deprecation","benchmark","one-batch-server","future-warning"],"backgroundTag":"deprecated-module-import","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}