Skip to content

Commit 2678f28

Browse files
committed
feat: Add PoC of sglang metrics server (default port 30000)
1 parent 498e666 commit 2678f28

File tree

1 file changed

+5
-1
lines changed
  • components/src/dynamo/sglang

1 file changed

+5
-1
lines changed

components/src/dynamo/sglang/main.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
import sglang as sgl
1111
import uvloop
12-
from sglang.srt.utils import get_ip
12+
from sglang.srt.utils import get_ip, launch_dummy_health_check_server
1313

1414
from dynamo.llm import ModelInput, ZmqKvEventPublisher, ZmqKvEventPublisherConfig
1515
from dynamo.runtime import DistributedRuntime, dynamo_worker
@@ -65,6 +65,10 @@ async def init(runtime: DistributedRuntime, config: Config):
6565
server_args, dynamo_args = config.server_args, config.dynamo_args
6666

6767
engine = sgl.Engine(server_args=server_args)
68+
if server_args.enable_metrics:
69+
launch_dummy_health_check_server(
70+
server_args.host, server_args.port, server_args.enable_metrics
71+
)
6872

6973
component = runtime.namespace(dynamo_args.namespace).component(
7074
dynamo_args.component

0 commit comments

Comments
 (0)