Datasets:
pierreguillou
commited on
Commit
•
a547a27
1
Parent(s):
d6602af
Update DocLayNet-small.py
Browse files- DocLayNet-small.py +7 -6
DocLayNet-small.py
CHANGED
@@ -98,14 +98,15 @@ class DocLayNet(datasets.GeneratorBasedBuilder):
|
|
98 |
# You will be able to load one or the other configurations in the following list with
|
99 |
# data = datasets.load_dataset('my_dataset', 'first_domain')
|
100 |
# data = datasets.load_dataset('my_dataset', 'second_domain')
|
|
|
|
|
|
|
101 |
BUILDER_CONFIGS = [
|
102 |
-
DocLayNetBuilderConfig(name=
|
103 |
]
|
104 |
|
105 |
BUILDER_CONFIG_CLASS = DocLayNetBuilderConfig
|
106 |
|
107 |
-
DEFAULT_CONFIG_NAME = "DocLayNet_2022.08_processed_on_2023.01" # It's not mandatory to have a default configuration. Just use one if it make sense.
|
108 |
-
|
109 |
def _info(self):
|
110 |
|
111 |
features = datasets.Features(
|
@@ -166,7 +167,7 @@ class DocLayNet(datasets.GeneratorBasedBuilder):
|
|
166 |
# These kwargs will be passed to _generate_examples
|
167 |
gen_kwargs={
|
168 |
"filepath": os.path.join(downloaded_file, "small_dataset/train/"),
|
169 |
-
"
|
170 |
},
|
171 |
),
|
172 |
datasets.SplitGenerator(
|
@@ -174,7 +175,7 @@ class DocLayNet(datasets.GeneratorBasedBuilder):
|
|
174 |
# These kwargs will be passed to _generate_examples
|
175 |
gen_kwargs={
|
176 |
"filepath": os.path.join(downloaded_file, "small_dataset/val/"),
|
177 |
-
"
|
178 |
},
|
179 |
),
|
180 |
datasets.SplitGenerator(
|
@@ -182,7 +183,7 @@ class DocLayNet(datasets.GeneratorBasedBuilder):
|
|
182 |
# These kwargs will be passed to _generate_examples
|
183 |
gen_kwargs={
|
184 |
"filepath": os.path.join(downloaded_file, "small_dataset/test/"),
|
185 |
-
"
|
186 |
},
|
187 |
),
|
188 |
]
|
|
|
98 |
# You will be able to load one or the other configurations in the following list with
|
99 |
# data = datasets.load_dataset('my_dataset', 'first_domain')
|
100 |
# data = datasets.load_dataset('my_dataset', 'second_domain')
|
101 |
+
|
102 |
+
DEFAULT_CONFIG_NAME = "DocLayNet_2022.08_processed_on_2023.01" # It's not mandatory to have a default configuration. Just use one if it make sense.
|
103 |
+
|
104 |
BUILDER_CONFIGS = [
|
105 |
+
DocLayNetBuilderConfig(name=DEFAULT_CONFIG_NAME, version=VERSION, description="DocLayNeT small dataset"),
|
106 |
]
|
107 |
|
108 |
BUILDER_CONFIG_CLASS = DocLayNetBuilderConfig
|
109 |
|
|
|
|
|
110 |
def _info(self):
|
111 |
|
112 |
features = datasets.Features(
|
|
|
167 |
# These kwargs will be passed to _generate_examples
|
168 |
gen_kwargs={
|
169 |
"filepath": os.path.join(downloaded_file, "small_dataset/train/"),
|
170 |
+
"split_key": "train",
|
171 |
},
|
172 |
),
|
173 |
datasets.SplitGenerator(
|
|
|
175 |
# These kwargs will be passed to _generate_examples
|
176 |
gen_kwargs={
|
177 |
"filepath": os.path.join(downloaded_file, "small_dataset/val/"),
|
178 |
+
"split_key": "validation",
|
179 |
},
|
180 |
),
|
181 |
datasets.SplitGenerator(
|
|
|
183 |
# These kwargs will be passed to _generate_examples
|
184 |
gen_kwargs={
|
185 |
"filepath": os.path.join(downloaded_file, "small_dataset/test/"),
|
186 |
+
"split_key": "test"
|
187 |
},
|
188 |
),
|
189 |
]
|