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
cdab2c03
Commit
cdab2c03
authored
Dec 23, 2021
by
Leo Gao
Browse files
headqa: maintain backwards compatibility
parent
5855f482
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
lm_eval/tasks/__init__.py
lm_eval/tasks/__init__.py
+1
-0
lm_eval/tasks/headqa.py
lm_eval/tasks/headqa.py
+7
-1
No files found.
lm_eval/tasks/__init__.py
View file @
cdab2c03
...
@@ -132,6 +132,7 @@ TASK_REGISTRY = {
...
@@ -132,6 +132,7 @@ TASK_REGISTRY = {
"squad2"
:
squad
.
SQuAD2
,
"squad2"
:
squad
.
SQuAD2
,
"race"
:
race
.
RACE
,
"race"
:
race
.
RACE
,
# "naturalqs": naturalqs.NaturalQs, # not implemented yet
# "naturalqs": naturalqs.NaturalQs, # not implemented yet
"headqa"
:
headqa
.
HeadQAEsDeprecated
,
# for backwards compat - headqa used to default to es
"headqa_es"
:
headqa
.
HeadQAEs
,
"headqa_es"
:
headqa
.
HeadQAEs
,
"headqa_en"
:
headqa
.
HeadQAEn
,
"headqa_en"
:
headqa
.
HeadQAEn
,
"mathqa"
:
mathqa
.
MathQA
,
"mathqa"
:
mathqa
.
MathQA
,
...
...
lm_eval/tasks/headqa.py
View file @
cdab2c03
...
@@ -35,4 +35,10 @@ class HeadQAEn(HeadQABase):
...
@@ -35,4 +35,10 @@ class HeadQAEn(HeadQABase):
DATASET_NAME
=
"en"
DATASET_NAME
=
"en"
class
HeadQAEs
(
HeadQABase
):
class
HeadQAEs
(
HeadQABase
):
DATASET_NAME
=
"es"
DATASET_NAME
=
"es"
\ No newline at end of file
# for backwards compatibility
class
HeadQAEsDeprecated
(
HeadQABase
):
DATASET_NAME
=
"es"
print
(
"WARNING: headqa is deprecated. Please use headqa_es or headqa_en instead. See https://github.com/EleutherAI/lm-evaluation-harness/pull/240 for more info."
)
\ No newline at end of file
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