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
change
sglang
Commits
35ec2a45
Unverified
Commit
35ec2a45
authored
Sep 25, 2025
by
Lianmin Zheng
Committed by
GitHub
Sep 25, 2025
Browse files
[minor] Remove deprecated function `get_ip` (#10883)
parent
0035f1ce
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
15 deletions
+9
-15
python/sglang/srt/utils.py
python/sglang/srt/utils.py
+4
-9
sgl-kernel/python/sgl_kernel/flash_attn.py
sgl-kernel/python/sgl_kernel/flash_attn.py
+0
-1
test/srt/openai_server/features/test_json_constrained.py
test/srt/openai_server/features/test_json_constrained.py
+5
-5
No files found.
python/sglang/srt/utils.py
View file @
35ec2a45
...
@@ -2054,13 +2054,6 @@ def set_uvicorn_logging_configs():
...
@@ -2054,13 +2054,6 @@ def set_uvicorn_logging_configs():
LOGGING_CONFIG
[
"formatters"
][
"access"
][
"datefmt"
]
=
"%Y-%m-%d %H:%M:%S"
LOGGING_CONFIG
[
"formatters"
][
"access"
][
"datefmt"
]
=
"%Y-%m-%d %H:%M:%S"
def
get_ip
()
->
Optional
[
str
]:
host_ip
=
os
.
getenv
(
"SGLANG_HOST_IP"
,
""
)
or
os
.
getenv
(
"HOST_IP"
,
""
)
if
host_ip
:
return
host_ip
return
None
def
get_open_port
()
->
int
:
def
get_open_port
()
->
int
:
port
=
os
.
getenv
(
"SGLANG_PORT"
)
port
=
os
.
getenv
(
"SGLANG_PORT"
)
if
port
is
not
None
:
if
port
is
not
None
:
...
@@ -2400,8 +2393,10 @@ def get_local_ip_auto(fallback: str = None) -> str:
...
@@ -2400,8 +2393,10 @@ def get_local_ip_auto(fallback: str = None) -> str:
2. Network interface enumeration via get_local_ip_by_nic()
2. Network interface enumeration via get_local_ip_by_nic()
3. Remote connection method via get_local_ip_by_remote()
3. Remote connection method via get_local_ip_by_remote()
"""
"""
if
ip
:
=
get_ip
():
# Try environment variable
return
ip
host_ip
=
os
.
getenv
(
"SGLANG_HOST_IP"
,
""
)
or
os
.
getenv
(
"HOST_IP"
,
""
)
if
host_ip
:
return
host_ip
logger
.
debug
(
"get_ip failed"
)
logger
.
debug
(
"get_ip failed"
)
# Fallback
# Fallback
if
ip
:
=
get_local_ip_by_nic
():
if
ip
:
=
get_local_ip_by_nic
():
...
...
sgl-kernel/python/sgl_kernel/flash_attn.py
View file @
35ec2a45
...
@@ -2,7 +2,6 @@ from functools import lru_cache
...
@@ -2,7 +2,6 @@ from functools import lru_cache
from
typing
import
Optional
,
Union
from
typing
import
Optional
,
Union
import
torch
import
torch
import
torch.nn
as
nn
try
:
try
:
from
sgl_kernel
import
flash_ops
from
sgl_kernel
import
flash_ops
...
...
test/srt/openai_server/features/test_json_constrained.py
View file @
35ec2a45
...
@@ -51,10 +51,10 @@ def setup_class(cls, backend: str):
...
@@ -51,10 +51,10 @@ def setup_class(cls, backend: str):
)
)
class
TestJSONConstrained
OutlinesBackend
(
CustomTestCase
):
class
TestJSONConstrained
(
CustomTestCase
):
@
classmethod
@
classmethod
def
setUpClass
(
cls
):
def
setUpClass
(
cls
):
setup_class
(
cls
,
backend
=
"
outlines
"
)
setup_class
(
cls
,
backend
=
"
xgrammar
"
)
@
classmethod
@
classmethod
def
tearDownClass
(
cls
):
def
tearDownClass
(
cls
):
...
@@ -137,13 +137,13 @@ class TestJSONConstrainedOutlinesBackend(CustomTestCase):
...
@@ -137,13 +137,13 @@ class TestJSONConstrainedOutlinesBackend(CustomTestCase):
list
(
executor
.
map
(
self
.
run_decode
,
json_schemas
))
list
(
executor
.
map
(
self
.
run_decode
,
json_schemas
))
class
TestJSONConstrained
XGrammar
Backend
(
TestJSONConstrained
OutlinesBackend
):
class
TestJSONConstrained
Outlines
Backend
(
TestJSONConstrained
):
@
classmethod
@
classmethod
def
setUpClass
(
cls
):
def
setUpClass
(
cls
):
setup_class
(
cls
,
backend
=
"
xgrammar
"
)
setup_class
(
cls
,
backend
=
"
outlines
"
)
class
TestJSONConstrainedLLGuidanceBackend
(
TestJSONConstrained
OutlinesBackend
):
class
TestJSONConstrainedLLGuidanceBackend
(
TestJSONConstrained
):
@
classmethod
@
classmethod
def
setUpClass
(
cls
):
def
setUpClass
(
cls
):
setup_class
(
cls
,
backend
=
"llguidance"
)
setup_class
(
cls
,
backend
=
"llguidance"
)
...
...
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