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
0fe2e80a
Unverified
Commit
0fe2e80a
authored
Dec 30, 2021
by
Leo Gao
Committed by
GitHub
Dec 30, 2021
Browse files
Merge pull request #245 from bigscience-workshop/thomas/improve_boolq
Nit on BoolQ
parents
5a53c368
f42a8d66
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
2 deletions
+4
-2
lm_eval/tasks/superglue.py
lm_eval/tasks/superglue.py
+2
-2
tests/testdata/boolq-v1-loglikelihood
tests/testdata/boolq-v1-loglikelihood
+1
-0
tests/testdata/boolq-v1-res.json
tests/testdata/boolq-v1-res.json
+1
-0
No files found.
lm_eval/tasks/superglue.py
View file @
0fe2e80a
...
...
@@ -13,7 +13,7 @@ from ..utils import general_detokenize
class
BoolQ
(
HFTask
):
VERSION
=
0
VERSION
=
1
DATASET_PATH
=
"super_glue"
DATASET_NAME
=
"boolq"
...
...
@@ -31,7 +31,7 @@ class BoolQ(HFTask):
return
"Read the following passages and answer each question with a yes or a no."
def
doc_to_text
(
self
,
doc
):
return
f
"
{
doc
[
'passage'
]
}
\n
Question:
{
doc
[
'question'
]
}
\n
Answer:"
return
f
"
{
doc
[
'passage'
]
}
\n
Question:
{
doc
[
'question'
]
}
?
\n
Answer:"
def
doc_to_target
(
self
,
doc
):
return
" "
+
yesno
(
doc
[
'label'
])
...
...
tests/testdata/boolq-v1-loglikelihood
0 → 100644
View file @
0fe2e80a
6577e0d88572772ef08e64f624c0e3df0953286ae1f118ccef15623b59ffeabf
\ No newline at end of file
tests/testdata/boolq-v1-res.json
0 → 100644
View file @
0fe2e80a
{
"results"
:
{
"boolq"
:
{
"acc"
:
0.5048929663608562
,
"acc_stderr"
:
0.00874463623355505
}},
"versions"
:
{
"boolq"
:
1
}}
\ 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