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
2338188f
Unverified
Commit
2338188f
authored
Oct 22, 2020
by
Stella Biderman
Committed by
GitHub
Oct 22, 2020
Browse files
Merge pull request #41 from zphang/copa_update
Update COPA cause/effect
parents
3d5d794a
d5893cdc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
lm_eval/tasks/superglue.py
lm_eval/tasks/superglue.py
+5
-1
No files found.
lm_eval/tasks/superglue.py
View file @
2338188f
...
...
@@ -94,7 +94,11 @@ class Copa(HFTask):
def
doc_to_text
(
self
,
doc
,
include_target
=
True
):
# Drop the period
text
=
doc
[
"premise"
].
strip
()[:
-
1
]
+
" because "
connector
=
{
"cause"
:
"because"
,
"effect"
:
"therefore"
,
}[
doc
[
"question"
]]
text
=
doc
[
"premise"
].
strip
()[:
-
1
]
+
f
"
{
connector
}
"
if
include_target
:
correct_choice
=
doc
[
"choice1"
]
if
doc
[
"label"
]
==
0
else
doc
[
"choice2"
]
# Connect the sentences
...
...
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