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
9abb1814
"configs/datasets/narrativeqa/narrativeqa_gen_a2d88a.py" did not exist on "3cfe73de3ff75cdb657f0db77cd6228c28f41da1"
Commit
9abb1814
authored
Apr 28, 2022
by
Shashi456
Browse files
Update gem_mlsum
parent
7e25c240
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
9 deletions
+44
-9
lm_eval/tasks/__init__.py
lm_eval/tasks/__init__.py
+12
-3
lm_eval/tasks/gem_mlsum.py
lm_eval/tasks/gem_mlsum.py
+32
-6
No files found.
lm_eval/tasks/__init__.py
View file @
9abb1814
...
@@ -53,9 +53,10 @@ from . import asdiv
...
@@ -53,9 +53,10 @@ from . import asdiv
from
.
import
gsm8k
from
.
import
gsm8k
from
.
import
storycloze
from
.
import
storycloze
from
.
import
hans
from
.
import
hans
from
.
import
mlsum
from
.
import
gem_webnlg
from
.
import
gem_webnlg
from
.
import
gem_mlsum
# from . import e2e_nlg_cleaned
# from . import e2e_nlg_cleaned
########################################
########################################
...
@@ -288,8 +289,16 @@ TASK_REGISTRY = {
...
@@ -288,8 +289,16 @@ TASK_REGISTRY = {
"blimp_wh_vs_that_no_gap_long_distance"
:
blimp
.
BlimpWhVsThatNoGapLongDistance
,
"blimp_wh_vs_that_no_gap_long_distance"
:
blimp
.
BlimpWhVsThatNoGapLongDistance
,
"blimp_wh_vs_that_with_gap"
:
blimp
.
BlimpWhVsThatWithGap
,
"blimp_wh_vs_that_with_gap"
:
blimp
.
BlimpWhVsThatWithGap
,
"blimp_wh_vs_that_with_gap_long_distance"
:
blimp
.
BlimpWhVsThatWithGapLongDistance
,
"blimp_wh_vs_that_with_gap_long_distance"
:
blimp
.
BlimpWhVsThatWithGapLongDistance
,
"mlsum_es"
:
mlsum
.
MLSUMEs
,
"mlsum_de"
:
mlsum
.
MLSUMDe
,
#GEM/mlsum
"mlsum_es"
:
gem_mlsum
.
MLSUMEs
,
"mlsum_de"
:
gem_mlsum
.
MLSUMDe
,
"mlsum_es_covid_challenge_set"
:
gem_mlsum
.
GEMMLSUMEsChallgeTestCovid
,
"mlsum_de_covid_challenge_set"
:
gem_mlsum
.
GEMMLSUMDeChallgeTestCovid
,
# Requires manual download of data.
# Requires manual download of data.
# "storycloze_2016": storycloze.StoryCloze2016,
# "storycloze_2016": storycloze.StoryCloze2016,
# "storycloze_2018": storycloze.StoryCloze2018,
# "storycloze_2018": storycloze.StoryCloze2018,
...
...
lm_eval/tasks/mlsum.py
→
lm_eval/tasks/
gem_
mlsum.py
View file @
9abb1814
...
@@ -22,7 +22,7 @@ _CITATION = """
...
@@ -22,7 +22,7 @@ _CITATION = """
"""
"""
class
MLSUMEs
(
PromptSourceTask
):
class
GEM
MLSUMEs
Base
(
PromptSourceTask
):
VERSION
=
0
VERSION
=
0
DATASET_PATH
=
"GEM/mlsum"
DATASET_PATH
=
"GEM/mlsum"
DATASET_NAME
=
"es"
DATASET_NAME
=
"es"
...
@@ -53,12 +53,24 @@ class MLSUMEs(PromptSourceTask):
...
@@ -53,12 +53,24 @@ class MLSUMEs(PromptSourceTask):
def
stopping_criteria
(
self
):
def
stopping_criteria
(
self
):
return
"."
return
"."
def
max_generation_length
(
self
):
class
GEMMLSUMEs
(
GEMMLSUMEsBase
):
return
120
'''this is for train/validation/test'''
SPLIT
=
''
class
GEMMLSUMEsChallgeTestCovid
(
GEMMLSUMEsBase
):
'''this is for challenge_test_covid'''
SPLIT
=
'challenge_test_covid'
def
has_training_docs
(
self
):
return
False
def
has_validation_docs
(
self
):
return
False
def
test_docs
(
self
):
if
self
.
has_test_docs
():
return
self
.
dataset
[
self
.
SPLIT
]
class
MLSUMDe
(
PromptSourceTask
):
class
GEM
MLSUMDe
Base
(
PromptSourceTask
):
VERSION
=
0
VERSION
=
0
DATASET_PATH
=
"GEM/mlsum"
DATASET_PATH
=
"GEM/mlsum"
DATASET_NAME
=
"de"
DATASET_NAME
=
"de"
...
@@ -89,5 +101,19 @@ class MLSUMDe(PromptSourceTask):
...
@@ -89,5 +101,19 @@ class MLSUMDe(PromptSourceTask):
def
stopping_criteria
(
self
):
def
stopping_criteria
(
self
):
return
"."
return
"."
def
max_generation_length
(
self
):
class
GEMMLSUMDe
(
GEMMLSUMDeBase
):
return
120
'''this is for train/validation/test'''
SPLIT
=
''
class
GEMMLSUMDeChallgeTestCovid
(
GEMMLSUMDeBase
):
'''this is for challenge_test_covid'''
SPLIT
=
'challenge_test_covid'
def
has_training_docs
(
self
):
return
False
def
has_validation_docs
(
self
):
return
False
def
test_docs
(
self
):
if
self
.
has_test_docs
():
return
self
.
dataset
[
self
.
SPLIT
]
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