Commit
•
239238f
1
Parent(s):
b21cad7
Update xsum.py
Browse files
xsum.py
CHANGED
@@ -73,7 +73,7 @@ _REMOVE_LINES = set(
|
|
73 |
class XsumConfig(datasets.BuilderConfig):
|
74 |
def __init__(self, *args, dummy=None, **kwargs):
|
75 |
super().__init__(*args, **kwargs)
|
76 |
-
self.dummy = dummy
|
77 |
|
78 |
|
79 |
class Xsum(datasets.GeneratorBasedBuilder):
|
@@ -82,9 +82,9 @@ class Xsum(datasets.GeneratorBasedBuilder):
|
|
82 |
# Version 1.2.0 expands coverage, includes ids, and removes web contents.
|
83 |
VERSION = datasets.Version("1.2.0")
|
84 |
|
85 |
-
BUILDER_CONFIG_CLASS =
|
86 |
|
87 |
-
|
88 |
|
89 |
def _info(self):
|
90 |
return datasets.DatasetInfo(
|
@@ -103,9 +103,9 @@ class Xsum(datasets.GeneratorBasedBuilder):
|
|
103 |
|
104 |
def _split_generators(self, dl_manager):
|
105 |
"""Returns SplitGenerators."""
|
106 |
-
print("!!!")
|
107 |
-
print(self.config.dummy)
|
108 |
-
print("///")
|
109 |
|
110 |
files_to_download = {"data": _URL_DATA, "splits": _URL_SPLITS}
|
111 |
downloaded_files = dl_manager.download(files_to_download)
|
@@ -120,15 +120,15 @@ class Xsum(datasets.GeneratorBasedBuilder):
|
|
120 |
"files": dl_manager.iter_archive(downloaded_files["data"]),
|
121 |
},
|
122 |
),
|
123 |
-
datasets.SplitGenerator(
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
),
|
132 |
datasets.SplitGenerator(
|
133 |
name=datasets.Split.TEST,
|
134 |
gen_kwargs={
|
|
|
73 |
class XsumConfig(datasets.BuilderConfig):
|
74 |
def __init__(self, *args, dummy=None, **kwargs):
|
75 |
super().__init__(*args, **kwargs)
|
76 |
+
# self.dummy = dummy
|
77 |
|
78 |
|
79 |
class Xsum(datasets.GeneratorBasedBuilder):
|
|
|
82 |
# Version 1.2.0 expands coverage, includes ids, and removes web contents.
|
83 |
VERSION = datasets.Version("1.2.0")
|
84 |
|
85 |
+
BUILDER_CONFIG_CLASS = XsumConfigGET
|
86 |
|
87 |
+
BUILDER_CONFIGS = [XsumConfig(name="v1"), XsumConfig(name="v2")]
|
88 |
|
89 |
def _info(self):
|
90 |
return datasets.DatasetInfo(
|
|
|
103 |
|
104 |
def _split_generators(self, dl_manager):
|
105 |
"""Returns SplitGenerators."""
|
106 |
+
# print("!!!")
|
107 |
+
# print(self.config.dummy)
|
108 |
+
# print("///")
|
109 |
|
110 |
files_to_download = {"data": _URL_DATA, "splits": _URL_SPLITS}
|
111 |
downloaded_files = dl_manager.download(files_to_download)
|
|
|
120 |
"files": dl_manager.iter_archive(downloaded_files["data"]),
|
121 |
},
|
122 |
),
|
123 |
+
# datasets.SplitGenerator(
|
124 |
+
# name=datasets.Split.VALIDATION,
|
125 |
+
# gen_kwargs={
|
126 |
+
# "split_path": downloaded_files["splits"],
|
127 |
+
# "split_name": "validation",
|
128 |
+
# "data_dir": "bbc-summary-data",
|
129 |
+
# "files": dl_manager.iter_archive(downloaded_files["data"]),
|
130 |
+
# },
|
131 |
+
# ),
|
132 |
datasets.SplitGenerator(
|
133 |
name=datasets.Split.TEST,
|
134 |
gen_kwargs={
|