merge 2.0.2 into 2.0.3 (#2917)

Co-authored-by: shige <shige@baidu.com>
This commit is contained in:
sg263
2025-07-22 14:46:20 +08:00
committed by GitHub
parent 4dbc483713
commit 580460046f
5 changed files with 107 additions and 34 deletions

View File

@@ -24,7 +24,7 @@ import zmq
from fastapi import FastAPI, Request
from fastapi.responses import JSONResponse, Response, StreamingResponse
from prometheus_client import CONTENT_TYPE_LATEST
from fastdeploy.metrics.trace_util import inject_to_metadata
from fastdeploy.metrics.trace_util import inject_to_metadata,instrument
from fastdeploy.engine.args_utils import EngineArgs
from fastdeploy.engine.engine import LLMEngine
@@ -141,6 +141,7 @@ async def lifespan(app: FastAPI):
app = FastAPI(lifespan=lifespan)
instrument(app)
# TODO 传递真实引擎值 通过pid 获取状态
@@ -397,11 +398,6 @@ def launch_controller_server():
"""Controller server running the sub thread"""
if args.controller_port < 0:
return
if not is_port_available(args.host, args.controller_port):
raise Exception(
f"The parameter `controller_port`:{args.controller_port} is already in use."
)
if not is_port_available(args.host, args.controller_port):
raise Exception(