Unverified Commit 2148914e authored by Lianmin Zheng's avatar Lianmin Zheng Committed by GitHub
Browse files

Fix log parsing in the chunked prefill unit tests (#1793)

parent def55bc8
...@@ -640,15 +640,17 @@ STDERR_FILENAME = "stderr.txt" ...@@ -640,15 +640,17 @@ STDERR_FILENAME = "stderr.txt"
def read_output(output_lines): def read_output(output_lines):
"""Print the output in real time with another thread."""
pt = 0 pt = 0
while pt >= 0: while pt >= 0:
if pt > 0 and 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 output_lines[:] = lines
for line in lines[pt:]: for line in lines[pt:]:
print(line, end="", flush=True) print(line, end="", flush=True)
pt += 1 pt += 1
time.sleep(0.1)
def run_mmlu_test( def run_mmlu_test(
......
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