[RL] Allow bypassing /health check (#13320)
This commit is contained in:
@@ -420,6 +420,12 @@ async def health_generate(request: Request) -> Response:
|
||||
if _global_state.tokenizer_manager.server_status == ServerStatus.Starting:
|
||||
return Response(status_code=503)
|
||||
|
||||
if (
|
||||
not envs.SGLANG_ENABLE_HEALTH_ENDPOINT_GENERATION
|
||||
and request.url.path == "/health"
|
||||
):
|
||||
return Response(status_code=200)
|
||||
|
||||
sampling_params = {"max_new_tokens": 1, "temperature": 0.0}
|
||||
rid = f"HEALTH_CHECK_{time.time()}"
|
||||
|
||||
|
||||
@@ -291,6 +291,9 @@ class Envs:
|
||||
# Warmup
|
||||
SGLANG_WARMUP_TIMEOUT = EnvFloat(-1) # in seconds. If a warmup forward batch takes longer than this, the server will crash to prevent hanging. Recommend to increase warmup timeout to 1800 to accommodate some kernel JIT precache e.g. deep gemm
|
||||
|
||||
# Health Check
|
||||
SGLANG_ENABLE_HEALTH_ENDPOINT_GENERATION = EnvBool(True)
|
||||
|
||||
# fmt: on
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user