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
c84a4af4
Unverified
Commit
c84a4af4
authored
Mar 25, 2021
by
Leo Gao
Committed by
GitHub
Mar 25, 2021
Browse files
qa4mre: remove fewshot_examples that uses test docs
parent
d7b20fe2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
6 deletions
+0
-6
lm_eval/tasks/qa4mre.py
lm_eval/tasks/qa4mre.py
+0
-6
No files found.
lm_eval/tasks/qa4mre.py
View file @
c84a4af4
...
@@ -46,12 +46,6 @@ class QA4MRE(MultipleChoiceTask):
...
@@ -46,12 +46,6 @@ class QA4MRE(MultipleChoiceTask):
def
has_test_docs
(
self
):
def
has_test_docs
(
self
):
return
True
return
True
def
fewshot_examples
(
self
,
k
):
# Since only test docs sample from test docs
if
self
.
_training_docs
is
None
:
self
.
_training_docs
=
list
(
self
.
test_docs
())
return
random
.
sample
(
self
.
_training_docs
,
k
)
def
_convert_standard
(
self
,
question
):
def
_convert_standard
(
self
,
question
):
choices
=
[
i
.
text
for
i
in
question
.
iter
(
'answer'
)]
choices
=
[
i
.
text
for
i
in
question
.
iter
(
'answer'
)]
out_doc
=
{
out_doc
=
{
...
...
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