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
2522c27f
Commit
2522c27f
authored
Apr 11, 2021
by
Ben Wang
Browse files
also apply normalization to piqa
parent
3eaa493e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
lm_eval/tasks/piqa.py
lm_eval/tasks/piqa.py
+4
-1
No files found.
lm_eval/tasks/piqa.py
View file @
2522c27f
...
...
@@ -34,8 +34,11 @@ class PiQA(HFTask):
return
ll_1
,
ll_2
def
process_results
(
self
,
doc
,
results
):
completion_len
=
np
.
array
([
float
(
len
(
doc
[
"sol1"
])),
float
(
len
(
doc
[
"sol2"
]))])
return
{
'acc'
:
np
.
argmax
(
results
)
==
doc
[
"label"
]
'acc'
:
np
.
argmax
(
results
)
==
doc
[
"label"
],
'acc_norm'
:
np
.
argmax
(
results
/
completion_len
)
==
doc
[
"label"
]
}
def
aggregation
(
self
):
...
...
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