albertvillanova HF staff commited on
Commit
26383ff
1 Parent(s): 322f53e

Define class labels only once for cluewsc2020 config

Browse files
Files changed (1) hide show
  1. clue.py +2 -2
clue.py CHANGED
@@ -175,7 +175,7 @@ class Clue(datasets.GeneratorBasedBuilder):
175
  """
176
  ),
177
  text_features={"text": "text", "target": "target"},
178
- label_classes=["false", "true"],
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=["true", "false"]),
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"),