config: read resolved config via namespace accessors (#33013)

This commit is contained in:
Cheng Wan
2026-07-31 15:06:59 -07:00
committed by GitHub
parent 4862edc85f
commit 55b6769b0e
187 changed files with 1110 additions and 923 deletions
@@ -19,6 +19,7 @@ from unittest.mock import MagicMock, patch
import torch
from sglang.srt import runtime_context as rc
from sglang.srt.layers.dcp.layout import get_dcp_lens
from sglang.srt.mem_cache.allocator.paged import PagedTokenToKVPoolAllocator
from sglang.srt.mem_cache.kv_cache_configurator import KVCacheConfigurator
@@ -136,6 +137,17 @@ class TestGetDcpLens(CustomTestCase):
)
allocators = {}
# The configurator's bag reads (disaggregation_mode / page_size /
# enable_hisparse) come from the published context; the per-iteration
# dcp_size stays on the injected instance stand-in.
self._sa_override = rc.get_context().override_server_args(
disaggregation_mode="null",
page_size=physical_page_size,
enable_hisparse=False,
)
self._sa_override.install()
self.addCleanup(self._sa_override.restore)
for dcp_size in (1, 4):
configurator = SimpleNamespace(
server_args=SimpleNamespace(