[Refactor] Unify logprob results into a single LogprobResult and rename chunk env vars (#31733)

This commit is contained in:
Liangsheng Yin
2026-07-20 12:44:27 -07:00
committed by GitHub
parent e149cdb337
commit ff6c755952
11 changed files with 139 additions and 151 deletions
+3 -3
View File
@@ -242,10 +242,10 @@ class TestLogprobsDense(unittest.TestCase):
chunk_size = kwargs.pop("chunk_size", None)
if chunk_size is not None:
print(f"Setting chunk size to {chunk_size}")
os.environ["SGLANG_ENABLE_LOGITS_PROCESSER_CHUNK"] = "True"
os.environ["SGLANG_LOGITS_PROCESSER_CHUNK_SIZE"] = str(chunk_size)
os.environ["SGLANG_ENABLE_LOGPROB_CHUNK"] = "True"
os.environ["SGLANG_LOGPROB_CHUNK_SIZE"] = str(chunk_size)
else:
os.environ["SGLANG_ENABLE_LOGITS_PROCESSER_CHUNK"] = "False"
os.environ["SGLANG_ENABLE_LOGPROB_CHUNK"] = "False"
# Create engine with merged configuration
engine_config = {**DEFAULT_ENGINE_CONFIG, **kwargs}