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
f9750990
Unverified
Commit
f9750990
authored
Feb 07, 2021
by
Leo Gao
Committed by
GitHub
Feb 07, 2021
Browse files
Remove stray space
parent
79c9b68a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
lm_eval/tasks/coqa.py
lm_eval/tasks/coqa.py
+2
-2
No files found.
lm_eval/tasks/coqa.py
View file @
f9750990
...
@@ -55,7 +55,7 @@ class CoQA(Task):
...
@@ -55,7 +55,7 @@ class CoQA(Task):
doc_text
=
doc
[
"story"
]
+
'
\n\n
'
doc_text
=
doc
[
"story"
]
+
'
\n\n
'
for
(
q
,
a
)
in
zip_longest
(
doc
[
"questions"
],
doc
[
"answers"
][:
-
1
]):
# omit target answer ai
for
(
q
,
a
)
in
zip_longest
(
doc
[
"questions"
],
doc
[
"answers"
][:
-
1
]):
# omit target answer ai
question
=
f
"Q:
{
q
[
'input_text'
]
}
"
+
'
\n\n
'
question
=
f
"Q:
{
q
[
'input_text'
]
}
"
+
'
\n\n
'
answer
=
f
"A:
{
a
[
'input_text'
]
}
"
+
'
\n\n
'
if
a
is
not
None
else
"A:
"
answer
=
f
"A:
{
a
[
'input_text'
]
}
"
+
'
\n\n
'
if
a
is
not
None
else
"A:"
doc_text
+=
question
+
answer
doc_text
+=
question
+
answer
print
(
doc_text
)
print
(
doc_text
)
return
doc_text
return
doc_text
...
@@ -163,4 +163,4 @@ class CoQA(Task):
...
@@ -163,4 +163,4 @@ class CoQA(Task):
return
{
return
{
"f1"
:
mean
,
"f1"
:
mean
,
"em"
:
mean
,
"em"
:
mean
,
}
}
\ No newline at end of file
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