Unverified Commit 40900bae authored by Lianmin Zheng's avatar Lianmin Zheng Committed by GitHub
Browse files

[Fix] Fix the log parsing in chunked prefill uni tests (#1794)

parent a2f5e755
...@@ -641,14 +641,17 @@ STDERR_FILENAME = "stderr.txt" ...@@ -641,14 +641,17 @@ STDERR_FILENAME = "stderr.txt"
def read_output(output_lines): def read_output(output_lines):
"""Print the output in real time with another thread.""" """Print the output in real time with another thread."""
while not os.path.exists(STDERR_FILENAME):
time.sleep(1)
pt = 0 pt = 0
while pt >= 0: while pt >= 0:
if pt > 0 and not os.path.exists(STDERR_FILENAME): if pt > 0 and not os.path.exists(STDERR_FILENAME):
break break
lines = open(STDERR_FILENAME).readlines() lines = open(STDERR_FILENAME).readlines()
output_lines[:] = lines
for line in lines[pt:]: for line in lines[pt:]:
print(line, end="", flush=True) print(line, end="", flush=True)
output_lines.append(line)
pt += 1 pt += 1
time.sleep(0.1) time.sleep(0.1)
...@@ -709,8 +712,10 @@ def run_mmlu_test( ...@@ -709,8 +712,10 @@ def run_mmlu_test(
kill_child_process(process.pid) kill_child_process(process.pid)
stdout.close() stdout.close()
stderr.close() stderr.close()
os.remove(STDOUT_FILENAME) if os.path.exists(STDOUT_FILENAME):
os.remove(STDERR_FILENAME) os.remove(STDOUT_FILENAME)
if os.path.exists(STDERR_FILENAME):
os.remove(STDERR_FILENAME)
t.join() t.join()
# Assert success # Assert success
......
...@@ -5,7 +5,6 @@ from sglang.test.test_utils import run_unittest_files ...@@ -5,7 +5,6 @@ from sglang.test.test_utils import run_unittest_files
suites = { suites = {
"minimal": [ "minimal": [
"test_radix_attention.py",
"models/test_embedding_models.py", "models/test_embedding_models.py",
"models/test_generation_models.py", "models/test_generation_models.py",
"models/test_lora.py", "models/test_lora.py",
...@@ -20,6 +19,7 @@ suites = { ...@@ -20,6 +19,7 @@ suites = {
"test_openai_server.py", "test_openai_server.py",
"test_overlap_schedule.py", "test_overlap_schedule.py",
"test_pytorch_sampling_backend.py", "test_pytorch_sampling_backend.py",
"test_radix_attention.py",
"test_retract_decode.py", "test_retract_decode.py",
"test_server_args.py", "test_server_args.py",
"test_skip_tokenizer_init.py", "test_skip_tokenizer_init.py",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment