gabrielaltay
commited on
Commit
·
ef1e503
1
Parent(s):
18917fc
Update tmp-scitail.py
Browse files- tmp-scitail.py +9 -2
tmp-scitail.py
CHANGED
@@ -28,7 +28,6 @@ import os
|
|
28 |
import datasets
|
29 |
import pandas as pd
|
30 |
|
31 |
-
import entailment
|
32 |
from configs import BigBioConfig
|
33 |
from constants import Lang, Tasks
|
34 |
from license import Licenses
|
@@ -75,6 +74,14 @@ _BIGBIO_VERSION = "1.0.0"
|
|
75 |
|
76 |
LABEL_MAP = {"entails": "entailment", "neutral": "neutral"}
|
77 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
|
79 |
class SciTailDataset(datasets.GeneratorBasedBuilder):
|
80 |
"""TODO: Short description of my dataset."""
|
@@ -114,7 +121,7 @@ class SciTailDataset(datasets.GeneratorBasedBuilder):
|
|
114 |
)
|
115 |
|
116 |
elif self.config.schema == "bigbio_te":
|
117 |
-
features =
|
118 |
|
119 |
return datasets.DatasetInfo(
|
120 |
description=_DESCRIPTION,
|
|
|
28 |
import datasets
|
29 |
import pandas as pd
|
30 |
|
|
|
31 |
from configs import BigBioConfig
|
32 |
from constants import Lang, Tasks
|
33 |
from license import Licenses
|
|
|
74 |
|
75 |
LABEL_MAP = {"entails": "entailment", "neutral": "neutral"}
|
76 |
|
77 |
+
entailment_features = datasets.Features(
|
78 |
+
{
|
79 |
+
"id": datasets.Value("string"),
|
80 |
+
"premise": datasets.Value("string"),
|
81 |
+
"hypothesis": datasets.Value("string"),
|
82 |
+
"label": datasets.Value("string"),
|
83 |
+
}
|
84 |
+
)
|
85 |
|
86 |
class SciTailDataset(datasets.GeneratorBasedBuilder):
|
87 |
"""TODO: Short description of my dataset."""
|
|
|
121 |
)
|
122 |
|
123 |
elif self.config.schema == "bigbio_te":
|
124 |
+
features = entailment_features
|
125 |
|
126 |
return datasets.DatasetInfo(
|
127 |
description=_DESCRIPTION,
|