[minor] Remove deprecated function get_ip (#10883)
This commit is contained in:
@@ -2054,13 +2054,6 @@ def set_uvicorn_logging_configs():
|
||||
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:
|
||||
port = os.getenv("SGLANG_PORT")
|
||||
if port is not None:
|
||||
@@ -2400,8 +2393,10 @@ def get_local_ip_auto(fallback: str = None) -> str:
|
||||
2. Network interface enumeration via get_local_ip_by_nic()
|
||||
3. Remote connection method via get_local_ip_by_remote()
|
||||
"""
|
||||
if ip := get_ip():
|
||||
return ip
|
||||
# Try environment variable
|
||||
host_ip = os.getenv("SGLANG_HOST_IP", "") or os.getenv("HOST_IP", "")
|
||||
if host_ip:
|
||||
return host_ip
|
||||
logger.debug("get_ip failed")
|
||||
# Fallback
|
||||
if ip := get_local_ip_by_nic():
|
||||
|
||||
@@ -2,7 +2,6 @@ from functools import lru_cache
|
||||
from typing import Optional, Union
|
||||
|
||||
import torch
|
||||
import torch.nn as nn
|
||||
|
||||
try:
|
||||
from sgl_kernel import flash_ops
|
||||
|
||||
@@ -51,10 +51,10 @@ def setup_class(cls, backend: str):
|
||||
)
|
||||
|
||||
|
||||
class TestJSONConstrainedOutlinesBackend(CustomTestCase):
|
||||
class TestJSONConstrained(CustomTestCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
setup_class(cls, backend="outlines")
|
||||
setup_class(cls, backend="xgrammar")
|
||||
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
@@ -137,13 +137,13 @@ class TestJSONConstrainedOutlinesBackend(CustomTestCase):
|
||||
list(executor.map(self.run_decode, json_schemas))
|
||||
|
||||
|
||||
class TestJSONConstrainedXGrammarBackend(TestJSONConstrainedOutlinesBackend):
|
||||
class TestJSONConstrainedOutlinesBackend(TestJSONConstrained):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
setup_class(cls, backend="xgrammar")
|
||||
setup_class(cls, backend="outlines")
|
||||
|
||||
|
||||
class TestJSONConstrainedLLGuidanceBackend(TestJSONConstrainedOutlinesBackend):
|
||||
class TestJSONConstrainedLLGuidanceBackend(TestJSONConstrained):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
setup_class(cls, backend="llguidance")
|
||||
|
||||
Reference in New Issue
Block a user