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
49f117ed
Unverified
Commit
49f117ed
authored
Apr 29, 2022
by
KhalidAlt
Committed by
GitHub
Apr 29, 2022
Browse files
Update lama.py
set (has_test_docs) to true
parent
674e0564
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
20 deletions
+22
-20
lm_eval/tasks/lama.py
lm_eval/tasks/lama.py
+22
-20
No files found.
lm_eval/tasks/lama.py
View file @
49f117ed
...
@@ -52,15 +52,15 @@ class Trex(PromptSourceTask):
...
@@ -52,15 +52,15 @@ class Trex(PromptSourceTask):
def
has_training_docs
(
self
):
def
has_training_docs
(
self
):
# TODO: Fill in the return with `True` if the Task has training data; else `False`.
# TODO: Fill in the return with `True` if the Task has training data; else `False`.
return
Tru
e
return
Fals
e
def
has_validation_docs
(
self
):
def
has_validation_docs
(
self
):
# TODO: Fill in the return with `True` if the Task has validation data; else `False`.
# TODO: Fill in the return with `True` if the Task has validation data; else `False`.
return
Tru
e
return
Fals
e
def
has_test_docs
(
self
):
def
has_test_docs
(
self
):
# TODO: Fill in the return with `True` if the Task has test data; else `False`.
# TODO: Fill in the return with `True` if the Task has test data; else `False`.
return
Fals
e
return
Tru
e
def
training_docs
(
self
):
def
training_docs
(
self
):
if
self
.
has_training_docs
():
if
self
.
has_training_docs
():
...
@@ -70,11 +70,11 @@ class Trex(PromptSourceTask):
...
@@ -70,11 +70,11 @@ class Trex(PromptSourceTask):
def
validation_docs
(
self
):
def
validation_docs
(
self
):
if
self
.
has_validation_docs
():
if
self
.
has_validation_docs
():
return
self
.
dataset
[
"
trai
n"
]
return
self
.
dataset
[
"
validatio
n"
]
def
test_docs
(
self
):
def
test_docs
(
self
):
if
self
.
has_test_docs
():
if
self
.
has_test_docs
():
return
self
.
dataset
[
"t
est
"
]
return
self
.
dataset
[
"t
rain
"
]
def
process_results
(
self
,
doc
,
results
):
def
process_results
(
self
,
doc
,
results
):
out
=
{}
out
=
{}
...
@@ -111,15 +111,15 @@ class google_re(PromptSourceTask):
...
@@ -111,15 +111,15 @@ class google_re(PromptSourceTask):
def
has_training_docs
(
self
):
def
has_training_docs
(
self
):
# TODO: Fill in the return with `True` if the Task has training data; else `False`.
# TODO: Fill in the return with `True` if the Task has training data; else `False`.
return
Tru
e
return
Fals
e
def
has_validation_docs
(
self
):
def
has_validation_docs
(
self
):
# TODO: Fill in the return with `True` if the Task has validation data; else `False`.
# TODO: Fill in the return with `True` if the Task has validation data; else `False`.
return
Tru
e
return
Fals
e
def
has_test_docs
(
self
):
def
has_test_docs
(
self
):
# TODO: Fill in the return with `True` if the Task has test data; else `False`.
# TODO: Fill in the return with `True` if the Task has test data; else `False`.
return
Fals
e
return
Tru
e
def
training_docs
(
self
):
def
training_docs
(
self
):
if
self
.
has_training_docs
():
if
self
.
has_training_docs
():
...
@@ -129,11 +129,11 @@ class google_re(PromptSourceTask):
...
@@ -129,11 +129,11 @@ class google_re(PromptSourceTask):
def
validation_docs
(
self
):
def
validation_docs
(
self
):
if
self
.
has_validation_docs
():
if
self
.
has_validation_docs
():
return
self
.
dataset
[
"
trai
n"
]
return
self
.
dataset
[
"
validatio
n"
]
def
test_docs
(
self
):
def
test_docs
(
self
):
if
self
.
has_test_docs
():
if
self
.
has_test_docs
():
return
self
.
dataset
[
"t
est
"
]
return
self
.
dataset
[
"t
rain
"
]
def
process_results
(
self
,
doc
,
results
):
def
process_results
(
self
,
doc
,
results
):
out
=
{}
out
=
{}
...
@@ -168,15 +168,16 @@ class Conceptnet(PromptSourceTask):
...
@@ -168,15 +168,16 @@ class Conceptnet(PromptSourceTask):
def
has_training_docs
(
self
):
def
has_training_docs
(
self
):
# TODO: Fill in the return with `True` if the Task has training data; else `False`.
# TODO: Fill in the return with `True` if the Task has training data; else `False`.
return
Tru
e
return
Fals
e
def
has_validation_docs
(
self
):
def
has_validation_docs
(
self
):
# TODO: Fill in the return with `True` if the Task has validation data; else `False`.
# TODO: Fill in the return with `True` if the Task has validation data; else `False`.
return
Tru
e
return
Fals
e
def
has_test_docs
(
self
):
def
has_test_docs
(
self
):
# TODO: Fill in the return with `True` if the Task has test data; else `False`.
# TODO: Fill in the return with `True` if the Task has test data; else `False`.
return
False
return
True
def
training_docs
(
self
):
def
training_docs
(
self
):
if
self
.
has_training_docs
():
if
self
.
has_training_docs
():
...
@@ -186,11 +187,11 @@ class Conceptnet(PromptSourceTask):
...
@@ -186,11 +187,11 @@ class Conceptnet(PromptSourceTask):
def
validation_docs
(
self
):
def
validation_docs
(
self
):
if
self
.
has_validation_docs
():
if
self
.
has_validation_docs
():
return
self
.
dataset
[
"
trai
n"
]
return
self
.
dataset
[
"
validatio
n"
]
def
test_docs
(
self
):
def
test_docs
(
self
):
if
self
.
has_test_docs
():
if
self
.
has_test_docs
():
return
self
.
dataset
[
"t
est
"
]
return
self
.
dataset
[
"t
rain
"
]
def
process_results
(
self
,
doc
,
results
):
def
process_results
(
self
,
doc
,
results
):
out
=
{}
out
=
{}
...
@@ -226,15 +227,16 @@ class Squad(PromptSourceTask):
...
@@ -226,15 +227,16 @@ class Squad(PromptSourceTask):
def
has_training_docs
(
self
):
def
has_training_docs
(
self
):
# TODO: Fill in the return with `True` if the Task has training data; else `False`.
# TODO: Fill in the return with `True` if the Task has training data; else `False`.
return
Tru
e
return
Fals
e
def
has_validation_docs
(
self
):
def
has_validation_docs
(
self
):
# TODO: Fill in the return with `True` if the Task has validation data; else `False`.
# TODO: Fill in the return with `True` if the Task has validation data; else `False`.
return
Tru
e
return
Fals
e
def
has_test_docs
(
self
):
def
has_test_docs
(
self
):
# TODO: Fill in the return with `True` if the Task has test data; else `False`.
# TODO: Fill in the return with `True` if the Task has test data; else `False`.
return
False
return
True
def
training_docs
(
self
):
def
training_docs
(
self
):
if
self
.
has_training_docs
():
if
self
.
has_training_docs
():
...
@@ -244,12 +246,12 @@ class Squad(PromptSourceTask):
...
@@ -244,12 +246,12 @@ class Squad(PromptSourceTask):
def
validation_docs
(
self
):
def
validation_docs
(
self
):
if
self
.
has_validation_docs
():
if
self
.
has_validation_docs
():
return
self
.
dataset
[
"
trai
n"
]
return
self
.
dataset
[
"
validatio
n"
]
def
test_docs
(
self
):
def
test_docs
(
self
):
if
self
.
has_test_docs
():
if
self
.
has_test_docs
():
self
.
_test_docs
=
list
(
self
.
dataset
[
"t
est
"
])
self
.
_test_docs
=
list
(
self
.
dataset
[
"t
rain
"
])
return
self
.
_test_docs
return
self
.
_test_docs
def
process_results
(
self
,
doc
,
results
):
def
process_results
(
self
,
doc
,
results
):
...
...
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