{"record":{"id":"5b02a647fe97218d","repo":"sgl-project/sglang","slug":"sglang-bench-offline-throughput-is-deprecated-an","errorCode":null,"errorMessage":"`sglang.bench_offline_throughput` is deprecated and will be removed in a future release; use `sglang.benchmark.offline_throughput` instead (e.g. `python -m sglang.benchmark.offline_throughput`).","messagePattern":"`sglang\\.bench_offline_throughput` is deprecated and will be removed in a future release; use `sglang\\.benchmark\\.offline_throughput` instead \\(e\\.g\\. `python -m sglang\\.benchmark\\.offline_throughput`\\)\\.","errorType":"console","errorClass":"FutureWarning","httpStatus":null,"severity":"warning","filePath":"python/sglang/bench_offline_throughput.py","lineNumber":14,"sourceCode":"\"\"\"Deprecated import path for ``sglang.benchmark.offline_throughput``.\n\n``python -m sglang.bench_offline_throughput`` and\n``from sglang.bench_offline_throughput import ...`` still work, but the\nimplementation now lives in ``sglang.benchmark.offline_throughput``.\nUpdate references to the new path.\n\"\"\"\n\nimport warnings\n\nfrom sglang.benchmark.offline_throughput import *  # noqa: F401,F403\nfrom sglang.benchmark.offline_throughput import cli_main\n\nwarnings.warn(\n    \"`sglang.bench_offline_throughput` is deprecated and will be removed in a \"\n    \"future release; use `sglang.benchmark.offline_throughput` instead \"\n    \"(e.g. `python -m sglang.benchmark.offline_throughput`).\",\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_offline_throughput.py#L1-L24","documentation":"FutureWarning emitted at import time of the legacy module sglang.bench_offline_throughput: the benchmark was moved to the sglang.benchmark package and the old top-level shim re-exports everything then warns. Functionally harmless, but the old path will be removed.","triggerScenarios":"Importing sglang.bench_offline_throughput or running python -m sglang.bench_offline_throughput (old CLI entry point / old scripts and docs).","commonSituations":"Scripts, Makefiles, or docs written against older sglang versions; CI logs filling with FutureWarnings after upgrading.","solutions":["Switch to python -m sglang.benchmark.offline_throughput","Update imports from sglang.bench_offline_throughput to sglang.benchmark.offline_throughput","Suppress temporarily with -W ignore::FutureWarning if you cannot edit the script yet"],"exampleFix":"# before\npython -m sglang.bench_offline_throughput --model ...\n# after\npython -m sglang.benchmark.offline_throughput --model ...","handlingStrategy":"fallback","validationCode":"import importlib.util\nmod = \"sglang.benchmark.offline_throughput\" if importlib.util.find_spec(\"sglang.benchmark.offline_throughput\") else \"sglang.bench_offline_throughput\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use python -m sglang.benchmark.offline_throughput in new scripts","Audit CI/scripts for sglang.bench_* module paths after each sglang upgrade"],"tags":["deprecation","benchmark","offline-throughput","future-warning"],"backgroundTag":"deprecated-module-import","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}