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
4c201b97
Commit
4c201b97
authored
Apr 25, 2022
by
cjlovering
Browse files
SST with PS integration. (It was already done.)
parent
e49cf8da
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
19 deletions
+0
-19
lm_eval/tasks/glue.py
lm_eval/tasks/glue.py
+0
-19
No files found.
lm_eval/tasks/glue.py
View file @
4c201b97
...
...
@@ -71,14 +71,6 @@ class CoLA(PromptSourceTask):
answer_choices_list
=
self
.
prompt
.
get_answer_choices_list
(
doc
)
pred
=
np
.
argmax
(
results
)
target
=
answer_choices_list
.
index
(
self
.
doc_to_target
(
doc
).
strip
())
print
(
"*"
*
80
)
print
(
f
"DOC:
{
doc
}
"
)
print
(
f
"TEXT:
{
self
.
doc_to_text
(
doc
)
}
"
)
print
(
f
"STRING TARGET:
{
self
.
doc_to_target
(
doc
)
}
END TARGET"
)
print
(
f
"TARGET:
{
target
}
END TARGET"
)
print
(
f
"PRED:
{
pred
}
"
)
print
(
"*"
*
80
)
return
{
"mcc"
:
(
target
,
pred
)}
def
higher_is_better
(
self
):
...
...
@@ -141,17 +133,6 @@ class MNLI(PromptSourceTask):
if
self
.
has_test_docs
():
return
self
.
dataset
[
"test_matched"
]
def
process_results
(
self
,
doc
,
results
):
gold
=
doc
[
"label"
]
pred
=
np
.
argmax
(
results
)
return
{
"acc"
:
pred
==
gold
}
def
higher_is_better
(
self
):
return
{
"acc"
:
True
}
def
aggregation
(
self
):
return
{
"acc"
:
mean
}
class
MNLIMismatched
(
MNLI
):
VERSION
=
0
...
...
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