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
da016758
Commit
da016758
authored
Jan 29, 2021
by
Jonathan Tow
Browse files
Revert "Update `doc_to_text` to show candidate fill-ins"
This reverts commit
5d431ba9
.
parent
5d431ba9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
4 deletions
+1
-4
lm_eval/tasks/hellaswag.py
lm_eval/tasks/hellaswag.py
+1
-4
No files found.
lm_eval/tasks/hellaswag.py
View file @
da016758
import
re
import
numpy
as
np
from
..base
import
rf
,
mean
from
.
common
import
HFTask
...
...
@@ -35,9 +34,7 @@ class HellaSwag(HFTask):
"plausibly completes the situation."
def
doc_to_text
(
self
,
doc
):
text
=
doc
[
'activity_label'
]
+
': '
+
doc
[
'ctx'
]
+
'
\n
'
text
+=
''
.
join
([
ending
+
"
\n
"
for
ending
in
doc
[
'endings'
]])
return
text
+
"
\n
"
return
doc
[
'activity_label'
]
+
': '
+
doc
[
'ctx'
]
+
'
\n
'
def
doc_to_target
(
self
,
doc
):
letter_answer
=
doc
[
'label'
]
...
...
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