Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
40900bae
Unverified
Commit
40900bae
authored
Oct 25, 2024
by
Lianmin Zheng
Committed by
GitHub
Oct 25, 2024
Browse files
[Fix] Fix the log parsing in chunked prefill uni tests (#1794)
parent
a2f5e755
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
python/sglang/test/test_utils.py
python/sglang/test/test_utils.py
+8
-3
test/srt/run_suite.py
test/srt/run_suite.py
+1
-1
No files found.
python/sglang/test/test_utils.py
View file @
40900bae
...
@@ -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
...
...
test/srt/run_suite.py
View file @
40900bae
...
@@ -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"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment