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
gaoqiong
lm-evaluation-harness
Commits
422380cc
"git@developer.sourcefind.cn:zhaoyu6/sglang.git" did not exist on "d71f3f0a2a55fd07154ac5e573f7715540d56b91"
Commit
422380cc
authored
Apr 25, 2022
by
cjlovering
Browse files
Print table across task and prompt
parent
053afe05
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
4 deletions
+32
-4
lm_eval/evaluator.py
lm_eval/evaluator.py
+32
-4
No files found.
lm_eval/evaluator.py
View file @
422380cc
...
...
@@ -275,8 +275,16 @@ def make_table(result_dict):
md_writer
=
MarkdownTableWriter
()
latex_writer
=
LatexTableWriter
()
md_writer
.
headers
=
[
"Task"
,
"Version"
,
"Metric"
,
"Value"
,
""
,
"Stderr"
]
latex_writer
.
headers
=
[
"Task"
,
"Version"
,
"Metric"
,
"Value"
,
""
,
"Stderr"
]
md_writer
.
headers
=
[
"Task"
,
"Prompt"
,
"Version"
,
"Metric"
,
"Value"
,
""
,
"Stderr"
]
latex_writer
.
headers
=
[
"Task"
,
"Prompt"
,
"Version"
,
"Metric"
,
"Value"
,
""
,
"Stderr"
,
]
values
=
[]
for
k
,
dic
in
result_dict
[
"results"
].
items
():
...
...
@@ -288,9 +296,29 @@ def make_table(result_dict):
continue
if
m
+
"_stderr"
in
dic
:
se
=
dic
[
m
+
"_stderr"
]
values
.
append
([
k
,
version
,
m
,
"%.4f"
%
v
,
"±"
,
"%.4f"
%
se
])
values
.
append
(
[
dic
[
"task_name"
],
dic
[
"prompt_name"
],
version
,
m
,
"%.4f"
%
v
,
"±"
,
"%.4f"
%
se
,
]
)
else
:
values
.
append
([
k
,
version
,
m
,
"%.4f"
%
v
,
""
,
""
])
values
.
append
(
[
dic
[
"task_name"
],
dic
[
"prompt_name"
],
version
,
m
,
"%.4f"
%
v
,
""
,
""
,
]
)
k
=
""
version
=
""
md_writer
.
value_matrix
=
values
...
...
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