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
d75128dc
Commit
d75128dc
authored
Jul 04, 2023
by
FarzanehNakhaee
Browse files
black update
parent
dd584086
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
8 deletions
+5
-8
lm_eval/tasks/qa4mre/preprocess_qa4mre.py
lm_eval/tasks/qa4mre/preprocess_qa4mre.py
+1
-1
lm_eval/tasks/super_glue/wic/utils.py
lm_eval/tasks/super_glue/wic/utils.py
+4
-7
No files found.
lm_eval/tasks/qa4mre/preprocess_qa4mre.py
View file @
d75128dc
def
qa4mre_process
(
doc
):
return
int
(
doc
[
'
correct_answer_id
'
])
-
1
return
int
(
doc
[
"
correct_answer_id
"
])
-
1
lm_eval/tasks/super_glue/wic/utils.py
View file @
d75128dc
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"
]],
)
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"
]],
)
...
...
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