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
ea3fd79b
Commit
ea3fd79b
authored
Jan 11, 2022
by
thomasw21
Browse files
Fix CB
parent
f16e8b5c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
lm_eval/tasks/superglue.py
lm_eval/tasks/superglue.py
+3
-3
No files found.
lm_eval/tasks/superglue.py
View file @
ea3fd79b
...
@@ -93,14 +93,14 @@ class CommitmentBank(HFTask):
...
@@ -93,14 +93,14 @@ class CommitmentBank(HFTask):
# True = entailment
# True = entailment
# False = contradiction
# False = contradiction
# Neither = neutral
# 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
):
def
construct_requests
(
self
,
doc
,
ctx
):
ll_true
,
_
=
rf
.
loglikelihood
(
ctx
,
' True'
)
ll_true
,
_
=
rf
.
loglikelihood
(
ctx
,
' True'
)
ll_neither
,
_
=
rf
.
loglikelihood
(
ctx
,
' Neither'
)
ll_false
,
_
=
rf
.
loglikelihood
(
ctx
,
' False'
)
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
):
def
process_results
(
self
,
doc
,
results
):
gold
=
doc
[
"label"
]
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