Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
zhaoyu6
sglang
Commits
4a762041
Unverified
Commit
4a762041
authored
Sep 23, 2025
by
Liangsheng Yin
Committed by
GitHub
Sep 23, 2025
Browse files
move `environ` into `sglang.srt` to avoid break SRT auto sync. (#10791)
parent
ea338676
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
4 deletions
+4
-4
python/sglang/launch_server.py
python/sglang/launch_server.py
+1
-1
python/sglang/srt/environ.py
python/sglang/srt/environ.py
+0
-0
python/sglang/srt/speculative/eagle_utils.py
python/sglang/srt/speculative/eagle_utils.py
+1
-1
python/sglang/srt/utils.py
python/sglang/srt/utils.py
+2
-2
No files found.
python/sglang/launch_server.py
View file @
4a762041
...
...
@@ -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) #
# #
...
...
python/sglang/environ.py
→
python/sglang/
srt/
environ.py
View file @
4a762041
File moved
python/sglang/srt/speculative/eagle_utils.py
View file @
4a762041
...
...
@@ -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
...
...
python/sglang/srt/utils.py
View file @
4a762041
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment