sgl-project/sglang · warning · DeprecationWarning
sglang.srt.layers.attention.nsa.index_buf_accessor is deprec
Error message
sglang.srt.layers.attention.nsa.index_buf_accessor is deprecated; use sglang.kernels.ops.attention.dsa.index_buf_accessor instead.
What it means
Import-time DeprecationWarning from a compat shim: the NSA index_buf_accessor module moved to sglang.kernels.ops.attention.dsa.index_buf_accessor. The shim re-exports the new module so behavior is unchanged, but the old path will be deleted.
Source
Thrown at python/sglang/srt/layers/attention/nsa/index_buf_accessor.py:4
# [Deprecated] Re-export shim for backward compatibility. Use dsa.index_buf_accessor instead.
import warnings
warnings.warn(
"sglang.srt.layers.attention.nsa.index_buf_accessor is deprecated; "
"use sglang.kernels.ops.attention.dsa.index_buf_accessor instead.",
DeprecationWarning,
stacklevel=2,
)
from sglang.kernels.ops.attention.dsa.index_buf_accessor import * # noqa: F401, F403
View on GitHub (pinned to 0132848349)
Solutions
- Update imports to sglang.kernels.ops.attention.dsa.index_buf_accessor
- Grep the repo for `attention.nsa` and fix all occurrences
- Add a CI check that fails on DeprecationWarning to prevent regressions
Example fix
# before from sglang.srt.layers.attention.nsa.index_buf_accessor import * # after from sglang.kernels.ops.attention.dsa.index_buf_accessor import *
Defensive patterns
Strategy: validation
Validate before calling
import importlib.util
assert importlib.util.find_spec("sglang.kernels.ops.attention.dsa.index_buf_accessor"), "upgrade sglang-kernels" Prevention
- Import from the dsa namespace directly
- Fail CI on DeprecationWarning from sglang.srt.layers.attention.nsa
When it happens
Trigger: Importing sglang.srt.layers.attention.nsa.index_buf_accessor directly or through the nsa package __init__; any from-import of names like index_buf_accessor helpers from the old path.
Common situations: Upgrading SGLang where NSA (Native Sparse Attention) code was renamed to DSA; user scripts or plugins pinned to the old module path.
Related errors
- sglang.srt.layers.attention.nsa.dequant_k_cache is deprecate
- sglang.srt.layers.attention.nsa.transform_index is deprecate
- sglang.srt.layers.attention.nsa is deprecated; use sglang.sr
- sglang.srt.layers.attention.nsa.nsa_backend_mtp_precompute i
- sglang.srt.layers.attention.nsa.nsa_indexer is deprecated; u
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/3c78cdd41f762fde.
Report an issue: GitHub.