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
ef3004d9
"git@developer.sourcefind.cn:OpenDAS/ollama.git" did not exist on "8d6fffaead722d86622b17c059051796d2621858"
Unverified
Commit
ef3004d9
authored
Aug 21, 2025
by
Mick
Committed by
GitHub
Aug 20, 2025
Browse files
misc: parse bench_serving result as markdown table (#9377)
parent
84719b52
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
test/srt/parse_results.py
test/srt/parse_results.py
+11
-2
No files found.
test/srt/parse_results.py
View file @
ef3004d9
...
@@ -8,6 +8,11 @@ from tabulate import tabulate
...
@@ -8,6 +8,11 @@ from tabulate import tabulate
# Parse command-line arguments
# Parse command-line arguments
parser
=
argparse
.
ArgumentParser
(
description
=
"Parse JSONL benchmark and summarize."
)
parser
=
argparse
.
ArgumentParser
(
description
=
"Parse JSONL benchmark and summarize."
)
parser
.
add_argument
(
"input_file"
,
type
=
str
,
help
=
"Path to input JSONL file"
)
parser
.
add_argument
(
"input_file"
,
type
=
str
,
help
=
"Path to input JSONL file"
)
parser
.
add_argument
(
"--md"
,
action
=
"store_true"
,
help
=
"If set, print the summary table in Markdown format (GitHub style)"
,
)
args
=
parser
.
parse_args
()
args
=
parser
.
parse_args
()
input_file
=
args
.
input_file
input_file
=
args
.
input_file
...
@@ -44,5 +49,9 @@ df = pd.DataFrame(results)
...
@@ -44,5 +49,9 @@ df = pd.DataFrame(results)
df
.
to_csv
(
output_file
,
index
=
False
)
df
.
to_csv
(
output_file
,
index
=
False
)
print
(
f
"
\n
Saved summary to:
{
output_file
}
\n
"
)
print
(
f
"
\n
Saved summary to:
{
output_file
}
\n
"
)
# Print ASCII table
if
args
.
md
:
print
(
tabulate
(
df
,
headers
=
"keys"
,
tablefmt
=
"grid"
,
floatfmt
=
".3f"
))
# Print Markdown table
print
(
tabulate
(
df
,
headers
=
"keys"
,
tablefmt
=
"github"
,
floatfmt
=
".3f"
))
else
:
# Print ASCII table
print
(
tabulate
(
df
,
headers
=
"keys"
,
tablefmt
=
"grid"
,
floatfmt
=
".3f"
))
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