Define class labels only once for cluewsc2020 config
#6
by
albertvillanova
HF staff
- opened
clue.py
CHANGED
@@ -175,7 +175,7 @@ class Clue(datasets.GeneratorBasedBuilder):
|
|
175 |
"""
|
176 |
),
|
177 |
text_features={"text": "text", "target": "target"},
|
178 |
-
label_classes=["
|
179 |
label_column="label",
|
180 |
data_url="https://storage.googleapis.com/cluebenchmark/tasks/cluewsc2020_public.zip",
|
181 |
),
|
@@ -346,7 +346,7 @@ class Clue(datasets.GeneratorBasedBuilder):
|
|
346 |
features = {
|
347 |
"idx": datasets.Value("int32"),
|
348 |
"text": datasets.Value("string"),
|
349 |
-
"label": datasets.features.ClassLabel(names=
|
350 |
"target": {
|
351 |
"span1_text": datasets.Value("string"),
|
352 |
"span2_text": datasets.Value("string"),
|
|
|
175 |
"""
|
176 |
),
|
177 |
text_features={"text": "text", "target": "target"},
|
178 |
+
label_classes=["true", "false"],
|
179 |
label_column="label",
|
180 |
data_url="https://storage.googleapis.com/cluebenchmark/tasks/cluewsc2020_public.zip",
|
181 |
),
|
|
|
346 |
features = {
|
347 |
"idx": datasets.Value("int32"),
|
348 |
"text": datasets.Value("string"),
|
349 |
+
"label": datasets.features.ClassLabel(names=self.config.label_classes),
|
350 |
"target": {
|
351 |
"span1_text": datasets.Value("string"),
|
352 |
"span2_text": datasets.Value("string"),
|