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
8c83a821
Commit
8c83a821
authored
Apr 25, 2022
by
ken
Browse files
Add SPLIT
parent
6a2b94b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
lm_eval/tasks/gem_xsum.py
lm_eval/tasks/gem_xsum.py
+13
-5
No files found.
lm_eval/tasks/gem_xsum.py
View file @
8c83a821
...
...
@@ -31,6 +31,7 @@ class GEMXSUMBase(PromptSourceTask):
VERSION
=
0
DATASET_PATH
=
"GEM/xsum"
DATASET_NAME
=
None
SPLIT
=
None
def
has_training_docs
(
self
):
return
True
...
...
@@ -62,9 +63,11 @@ class GEMXSUMBase(PromptSourceTask):
class
GEMXSUM
(
GEMXSUMBase
):
'''this is for train/validation/test'''
SPLIT
=
''
class
GEMXSUMChallgeSample
(
GEMXSUMBase
):
'''this is for challenge_train_sample/challenge_validation_sample'''
SPLIT
=
'challenge_sample'
def
has_test_docs
(
self
):
return
False
...
...
@@ -84,6 +87,7 @@ class GEMXSUMChallgeSample(GEMXSUMBase):
class
GEMXSUMChallgeTestBacktranslation
(
GEMXSUMBase
):
'''this is for challenge_test_backtranslation'''
SPLIT
=
'challenge_test_backtranslation'
def
has_training_docs
(
self
):
return
False
...
...
@@ -93,10 +97,11 @@ class GEMXSUMChallgeTestBacktranslation(GEMXSUMBase):
def
test_docs
(
self
):
if
self
.
has_test_docs
():
return
self
.
dataset
[
"challenge_test_backtranslation"
]
return
self
.
dataset
[
SPLIT
]
class
GEMXSUMChallgeTestBFP02
(
GEMXSUMBase
):
'''this is for challenge_test_bfp_02'''
SPLIT
=
'challenge_test_bfp_02'
def
has_training_docs
(
self
):
return
False
...
...
@@ -106,10 +111,11 @@ class GEMXSUMChallgeTestBFP02(GEMXSUMBase):
def
test_docs
(
self
):
if
self
.
has_test_docs
():
return
self
.
dataset
[
"challenge_test_bfp_02"
]
return
self
.
dataset
[
SPLIT
]
class
GEMXSUMChallgeTestBFP05
(
GEMXSUMBase
):
'''this is for challenge_test_bfp_05'''
SPLIT
=
'challenge_test_bfp_05'
def
has_training_docs
(
self
):
return
False
...
...
@@ -118,10 +124,11 @@ class GEMXSUMChallgeTestBFP05(GEMXSUMBase):
return
False
def
test_docs
(
self
):
if
self
.
has_test_docs
():
return
self
.
dataset
[
"challenge_test_bfp_05"
]
return
self
.
dataset
[
SPLIT
]
class
GEMXSUMChallgeTestNopunc
(
GEMXSUMBase
):
'''this is for challenge_test_nopunc'''
SPLIT
=
'challenge_test_nopunc'
def
has_training_docs
(
self
):
return
False
...
...
@@ -130,10 +137,11 @@ class GEMXSUMChallgeTestNopunc(GEMXSUMBase):
return
False
def
test_docs
(
self
):
if
self
.
has_test_docs
():
return
self
.
dataset
[
"challenge_test_nopunc"
]
return
self
.
dataset
[
SPLIT
]
class
GEMXSUMChallgeTestCovid
(
GEMXSUMBase
):
'''this is for challenge_test_covid'''
SPLIT
=
'challenge_test_covid'
def
has_training_docs
(
self
):
return
False
...
...
@@ -142,4 +150,4 @@ class GEMXSUMChallgeTestCovid(GEMXSUMBase):
return
False
def
test_docs
(
self
):
if
self
.
has_test_docs
():
return
self
.
dataset
[
"challenge_test_covid"
]
\ No newline at end of file
return
self
.
dataset
[
SPLIT
]
\ 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