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
8737d53a
Commit
8737d53a
authored
Jul 03, 2023
by
lintangsutawika
Browse files
fixed super_glue and removed unused yaml config
parent
2ef2d35f
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
lm_eval/tasks/super_glue/wic/utils.py
lm_eval/tasks/super_glue/wic/utils.py
+13
-0
lm_eval/tasks/super_glue/wsc/t5-prompt.yaml
lm_eval/tasks/super_glue/wsc/t5-prompt.yaml
+1
-2
No files found.
lm_eval/tasks/super_glue/wic/utils.py
0 → 100644
View file @
8737d53a
def
doc_to_text
(
doc
):
return
(
"Sentence 1: {}
\n
Sentence 2: {}
\n
Question: Is the word '{}' used in the same way in the"
" two sentences above?
\n
Answer:"
.
format
(
doc
[
"sentence1"
],
doc
[
"sentence2"
],
doc
[
"sentence1"
][
doc
[
"start1"
]
:
doc
[
"end1"
]],
)
)
def
doc_to_target
(
doc
):
return
" {}"
.
format
({
0
:
"no"
,
1
:
"yes"
}[
doc
[
"label"
]])
lm_eval/tasks/super_glue/wsc/t5-prompt.yaml
View file @
8737d53a
group
:
-
super-glue-t5-prompt
task
:
t5-prompt
reference
:
"
From
Raffel
et.
al.
2019"
task
:
super_glue-wsc-t5-prompt
dataset_path
:
super_glue
dataset_name
:
wsc
training_split
:
train
...
...
Prev
1
2
Next
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