PiC commited on
Commit
0f2a85d
1 Parent(s): 88bec5e

Update phrase_similarity.py

Browse files
Files changed (1) hide show
  1. phrase_similarity.py +4 -2
phrase_similarity.py CHANGED
@@ -79,7 +79,8 @@ class PhraseSimilarity(datasets.GeneratorBasedBuilder):
79
  "phrase2": datasets.Value("string"),
80
  "sentence1": datasets.Value("string"),
81
  "sentence2": datasets.Value("string"),
82
- "label": datasets.ClassLabel(num_classes=2, names=["negative", "positive"])
 
83
  }
84
  ),
85
  # No default supervised_keys (as we have to pass both question and context as input).
@@ -115,6 +116,7 @@ class PhraseSimilarity(datasets.GeneratorBasedBuilder):
115
  "phrase2": example["phrase2"],
116
  "sentence1": example["sentence1"],
117
  "sentence2": example["sentence2"],
118
- "label": example["label"]
 
119
  }
120
  key += 1
 
79
  "phrase2": datasets.Value("string"),
80
  "sentence1": datasets.Value("string"),
81
  "sentence2": datasets.Value("string"),
82
+ "label": datasets.ClassLabel(num_classes=2, names=["negative", "positive"]),
83
+ "idx": datasets.Value("int32")
84
  }
85
  ),
86
  # No default supervised_keys (as we have to pass both question and context as input).
 
116
  "phrase2": example["phrase2"],
117
  "sentence1": example["sentence1"],
118
  "sentence2": example["sentence2"],
119
+ "label": example["label"],
120
+ "idx": example["idx"]
121
  }
122
  key += 1