move environ into sglang.srt to avoid break SRT auto sync. (#10791)

This commit is contained in:
Liangsheng Yin
2025-09-23 17:04:20 +08:00
committed by GitHub
parent ea338676b5
commit 4a762041d7
4 changed files with 4 additions and 4 deletions

View File

@@ -10,7 +10,7 @@ from sglang.srt.utils import kill_process_tree
MOVE_ENVS_WARN = """
########################################################################
# For contributors and developers: #
# Please move environment variable definitions to 'sglang/environ.py' #
# Please move environment variable definitions to sglang.srt.environ #
# using the following pattern: #
# SGLANG_XXX = EnvBool(False) #
# #

View File

@@ -12,8 +12,8 @@ import torch.nn.functional as F
import triton
import triton.language as tl
from sglang.environ import envs
from sglang.srt.constrained.base_grammar_backend import BaseGrammarObject
from sglang.srt.environ import envs
from sglang.srt.layers.attention.utils import create_flashinfer_kv_indices_triton
from sglang.srt.layers.logits_processor import LogitsProcessorOutput
from sglang.srt.layers.sampler import apply_custom_logit_processor

View File

@@ -195,7 +195,7 @@ _warned_bool_env_var_keys = set()
def get_bool_env_var(name: str, default: str = "false") -> bool:
# FIXME: move your environment variable to sglang.environ
# FIXME: move your environment variable to sglang.srt.environ
value = os.getenv(name, default)
value = value.lower()
@@ -213,7 +213,7 @@ def get_bool_env_var(name: str, default: str = "false") -> bool:
def get_int_env_var(name: str, default: int = 0) -> int:
# FIXME: move your environment variable to sglang.environ
# FIXME: move your environment variable to sglang.srt.environ
value = os.getenv(name)
if value is None or not value.strip():
return default