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
c3d941b9
Unverified
Commit
c3d941b9
authored
Jan 14, 2022
by
Leo Gao
Committed by
GitHub
Jan 14, 2022
Browse files
Merge pull request #254 from bigscience-workshop/thomas/fix_cb
Fix CB
parents
4849702e
b421f052
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
lm_eval/tasks/superglue.py
lm_eval/tasks/superglue.py
+4
-4
No files found.
lm_eval/tasks/superglue.py
View file @
c3d941b9
...
...
@@ -61,7 +61,7 @@ class BoolQ(HFTask):
class
CommitmentBank
(
HFTask
):
VERSION
=
0
VERSION
=
1
DATASET_PATH
=
"super_glue"
DATASET_NAME
=
"cb"
...
...
@@ -84,14 +84,14 @@ class CommitmentBank(HFTask):
# True = entailment
# False = contradiction
# Neither = neutral
return
" {}"
.
format
({
0
:
"True"
,
1
:
"
Neither"
,
2
:
"False
"
}[
doc
[
"label"
]])
return
" {}"
.
format
({
0
:
"True"
,
1
:
"
False"
,
2
:
"Neither
"
}[
doc
[
"label"
]])
def
construct_requests
(
self
,
doc
,
ctx
):
ll_true
,
_
=
rf
.
loglikelihood
(
ctx
,
' True'
)
ll_neither
,
_
=
rf
.
loglikelihood
(
ctx
,
' Neither'
)
ll_false
,
_
=
rf
.
loglikelihood
(
ctx
,
' False'
)
ll_neither
,
_
=
rf
.
loglikelihood
(
ctx
,
' Neither'
)
return
ll_true
,
ll_
neither
,
ll_false
return
ll_true
,
ll_
false
,
ll_neither
def
process_results
(
self
,
doc
,
results
):
gold
=
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