{"record":{"id":"9d2a0bb3adfe5373","repo":"sgl-project/sglang","slug":"sglang-srt-layers-attention-nsa-transform-index-is","errorCode":null,"errorMessage":"sglang.srt.layers.attention.nsa.transform_index is deprecated; use sglang.kernels.ops.attention.dsa.transform_index instead.","messagePattern":"sglang\\.srt\\.layers\\.attention\\.nsa\\.transform_index is deprecated; use sglang\\.kernels\\.ops\\.attention\\.dsa\\.transform_index instead\\.","errorType":"console","errorClass":"DeprecationWarning","httpStatus":null,"severity":"warning","filePath":"python/sglang/srt/layers/attention/nsa/transform_index.py","lineNumber":4,"sourceCode":"# [Deprecated] Re-export shim for backward compatibility. Use dsa.transform_index instead.\nimport warnings\n\nwarnings.warn(\n    \"sglang.srt.layers.attention.nsa.transform_index is deprecated; \"\n    \"use sglang.kernels.ops.attention.dsa.transform_index instead.\",\n    DeprecationWarning,\n    stacklevel=2,\n)\nfrom sglang.kernels.ops.attention.dsa.transform_index import *  # noqa: F401, F403\n","sourceCodeStart":1,"sourceCodeEnd":11,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/layers/attention/nsa/transform_index.py#L1-L11","documentation":"DeprecationWarning emitted when importing the old nsa.transform_index shim; the module now lives at sglang.kernels.ops.attention.dsa.transform_index and is re-exported for compatibility.","triggerScenarios":"`from sglang.srt.layers.attention.nsa.transform_index import ...` or indirect import via the nsa package.","commonSituations":"Post-upgrade code that transforms sparse-attention indices using the pre-rename module path.","solutions":["Import from sglang.kernels.ops.attention.dsa.transform_index","Audit imports with grep for `attention\\.nsa`","Pin an older SGLang release only if you cannot patch immediately"],"exampleFix":"# before\nfrom sglang.srt.layers.attention.nsa.transform_index import transform_index\n# after\nfrom sglang.kernels.ops.attention.dsa.transform_index import transform_index","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Update transform_index imports to the dsa kernels path","Run a repo-wide grep for `nsa.transform_index`"],"tags":["deprecation","sglang","nsa","import"],"backgroundTag":"deprecation-warning","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}