Update files from the datasets library (from 1.16.0)
Browse filesRelease notes: https://github.com/huggingface/datasets/releases/tag/1.16.0
clue.py
CHANGED
@@ -458,7 +458,7 @@ class Clue(datasets.GeneratorBasedBuilder):
|
|
458 |
label_classes = self.config.label_classes
|
459 |
|
460 |
if self.config.name == "chid" and split != "test":
|
461 |
-
answer_file = os.path.join(os.path.dirname(data_file), "{}_answer.json"
|
462 |
answer_dict = json.load(open(answer_file, encoding="utf8"))
|
463 |
|
464 |
if self.config.name == "c3":
|
@@ -466,7 +466,7 @@ class Clue(datasets.GeneratorBasedBuilder):
|
|
466 |
files = [data_file]
|
467 |
else:
|
468 |
data_dir = os.path.dirname(data_file)
|
469 |
-
files = [os.path.join(data_dir, "{}-{}.json"
|
470 |
data = []
|
471 |
for f in files:
|
472 |
data_subset = json.load(open(f, encoding="utf8"))
|
458 |
label_classes = self.config.label_classes
|
459 |
|
460 |
if self.config.name == "chid" and split != "test":
|
461 |
+
answer_file = os.path.join(os.path.dirname(data_file), f"{split}_answer.json")
|
462 |
answer_dict = json.load(open(answer_file, encoding="utf8"))
|
463 |
|
464 |
if self.config.name == "c3":
|
466 |
files = [data_file]
|
467 |
else:
|
468 |
data_dir = os.path.dirname(data_file)
|
469 |
+
files = [os.path.join(data_dir, f"{typ}-{split}.json") for typ in ["d", "m"]]
|
470 |
data = []
|
471 |
for f in files:
|
472 |
data_subset = json.load(open(f, encoding="utf8"))
|