Commit
·
bda8cf0
1
Parent(s):
712290e
wip
Browse files- test_dataset.py +1 -1
test_dataset.py
CHANGED
|
@@ -58,6 +58,7 @@ class TestDatasetEvals(datasets.GeneratorBasedBuilder):
|
|
| 58 |
TestDatasetConfig(
|
| 59 |
name="juggernaut",
|
| 60 |
description= "this is a test dataset for our unit test intergrating HF datasets" ,
|
|
|
|
| 61 |
text_features={"context": "context", "continuation": "answer"},
|
| 62 |
data_dir="heroes",
|
| 63 |
),
|
|
@@ -96,7 +97,6 @@ class TestDatasetEvals(datasets.GeneratorBasedBuilder):
|
|
| 96 |
with open(data_file, encoding="utf8") as f:
|
| 97 |
for n, row in enumerate(f):
|
| 98 |
data = json.loads(row)
|
| 99 |
-
print(data.items())
|
| 100 |
example = {feat: data[col] for feat, col in self.config.text_features.items()}
|
| 101 |
example["idx"] = n
|
| 102 |
yield example["idx"], example
|
|
|
|
| 58 |
TestDatasetConfig(
|
| 59 |
name="juggernaut",
|
| 60 |
description= "this is a test dataset for our unit test intergrating HF datasets" ,
|
| 61 |
+
# TODO: unclear why "answer" is needed if juggernaut/data.jsonl has no "answer" key
|
| 62 |
text_features={"context": "context", "continuation": "answer"},
|
| 63 |
data_dir="heroes",
|
| 64 |
),
|
|
|
|
| 97 |
with open(data_file, encoding="utf8") as f:
|
| 98 |
for n, row in enumerate(f):
|
| 99 |
data = json.loads(row)
|
|
|
|
| 100 |
example = {feat: data[col] for feat, col in self.config.text_features.items()}
|
| 101 |
example["idx"] = n
|
| 102 |
yield example["idx"], example
|