[Fix] Fix uvloop get_event_loop() is not suitable for 0.22.x (#13612)

Signed-off-by: lzy <tomlzy213@gmail.com>
Co-authored-by: lzy <tomlzy213@gmail.com>
This commit is contained in:
Zhi Yiliu
2025-11-25 01:20:00 +08:00
committed by GitHub
co-authored by lzy
parent 98b38de3f2
commit a95a38078b
9 changed files with 32 additions and 20 deletions
+2 -1
View File
@@ -8,6 +8,7 @@ from typing import Optional
import numpy as np
import sglang as sgl
from sglang.srt.utils import get_or_create_event_loop
from sglang.utils import download_and_cache_file, read_jsonl
INVALID = -9999999
@@ -89,7 +90,7 @@ def run_eval(args):
# Run requests
tic = time.perf_counter()
loop = asyncio.get_event_loop()
loop = get_or_create_event_loop()
outputs = loop.run_until_complete(
concurrent_generate(engine, prompts, sampling_param)