Commit ·
14f404d
1
Parent(s): a834af9
Update testdataset.py
Browse files- testdataset.py +5 -29
testdataset.py
CHANGED
|
@@ -93,22 +93,11 @@ class MedNLIDataset(datasets.GeneratorBasedBuilder):
|
|
| 93 |
|
| 94 |
def _info(self) -> datasets.DatasetInfo:
|
| 95 |
print(self.config)
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
# "sentence1": datasets.Value("string"),
|
| 102 |
-
# "sentence2": datasets.Value("string"),
|
| 103 |
-
# "sentence1_parse": datasets.Value("string"),
|
| 104 |
-
# "sentence2_parse": datasets.Value("string"),
|
| 105 |
-
# "sentence1_binary_parse": datasets.Value("string"),
|
| 106 |
-
# "sentence2_binary_parse": datasets.Value("string"),
|
| 107 |
-
# }
|
| 108 |
-
# )
|
| 109 |
-
|
| 110 |
-
# elif self.config.schema == "testdataset_te":
|
| 111 |
-
# features = entailment_features
|
| 112 |
|
| 113 |
return datasets.DatasetInfo(
|
| 114 |
description=_DESCRIPTION,
|
|
@@ -122,19 +111,6 @@ class MedNLIDataset(datasets.GeneratorBasedBuilder):
|
|
| 122 |
data_dir = self.config.data_dir
|
| 123 |
if data_dir is None:
|
| 124 |
raise ValueError(
|
| 125 |
-
"This is a local dataset. Please pass the data_dir kwarg to load_dataset."
|
| 126 |
-
)
|
| 127 |
-
# else:
|
| 128 |
-
# extract_dir = dl_manager.extract(
|
| 129 |
-
# os.path.join(
|
| 130 |
-
# self.config.data_dir,
|
| 131 |
-
# "mednli-a-natural-language-inference-dataset-for-the-clinical-domain-1.0.0.zip",
|
| 132 |
-
# )
|
| 133 |
-
# )
|
| 134 |
-
# data_dir = os.path.join(
|
| 135 |
-
# extract_dir,
|
| 136 |
-
# "mednli-a-natural-language-inference-dataset-for-the-clinical-domain-1.0.0",
|
| 137 |
-
# )
|
| 138 |
|
| 139 |
return [
|
| 140 |
datasets.SplitGenerator(
|
|
|
|
| 93 |
|
| 94 |
def _info(self) -> datasets.DatasetInfo:
|
| 95 |
print(self.config)
|
| 96 |
+
features = datasets.Features(
|
| 97 |
+
{
|
| 98 |
+
"test": datasets.Value("string")
|
| 99 |
+
}
|
| 100 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 101 |
|
| 102 |
return datasets.DatasetInfo(
|
| 103 |
description=_DESCRIPTION,
|
|
|
|
| 111 |
data_dir = self.config.data_dir
|
| 112 |
if data_dir is None:
|
| 113 |
raise ValueError(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 114 |
|
| 115 |
return [
|
| 116 |
datasets.SplitGenerator(
|