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
09a71562
Commit
09a71562
authored
Jul 13, 2023
by
haileyschoelkopf
Browse files
log all arguments per doc
parent
165f8493
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
lm_eval/evaluator.py
lm_eval/evaluator.py
+5
-2
No files found.
lm_eval/evaluator.py
View file @
09a71562
...
...
@@ -213,7 +213,10 @@ def evaluate(
# aggregate Instances by LM method requested to get output.
reqtype
=
(
"loglikelihood"
if
(
task
.
OUTPUT_TYPE
==
"multiple_choice"
or
task
.
OUTPUT_TYPE
==
"winograd_schema"
)
if
(
task
.
OUTPUT_TYPE
==
"multiple_choice"
or
task
.
OUTPUT_TYPE
==
"winograd_schema"
)
else
task
.
OUTPUT_TYPE
)
# TODO: this is hacky, fix in task.py
requests
[
reqtype
].
extend
(
task
.
instances
)
...
...
@@ -284,7 +287,7 @@ def evaluate(
"doc_id"
:
doc_id
,
"doc"
:
doc
,
"target"
:
target
,
"arguments"
:
requests
[
0
].
args
,
"arguments"
:
[
req
.
args
for
req
in
requests
]
,
"resps"
:
[
req
.
resps
for
req
in
requests
],
"filtered_resps"
:
[
req
.
filtered_resps
[
key
]
for
req
in
requests
],
}
...
...
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