Datasets:
Upload DiscoEval.py
Browse files- DiscoEval.py +27 -27
DiscoEval.py
CHANGED
@@ -185,30 +185,36 @@ class DiscoEvalSentence(datasets.GeneratorBasedBuilder):
|
|
185 |
# data_dir = dl_manager.download_and_extract(urls)
|
186 |
|
187 |
if self.config.name in [constants.SPARXIV, constants.SPROCSTORY, constants.SPWIKI]:
|
188 |
-
subfolder = os.path.join(constants.SP_DATA_DIR, constants.SP_DIRS[self.config.name])
|
189 |
-
data_dir =
|
190 |
-
|
191 |
repo_id="OfekGlick/DiscoEval",
|
192 |
-
filename=constants.SP_TRAIN_NAME,
|
193 |
-
subfolder=subfolder,
|
194 |
-
repo_type="dataset",
|
195 |
-
local_dir='./',
|
196 |
-
)
|
197 |
-
|
198 |
-
valid_url = hf_hub_download(
|
199 |
-
repo_id="OfekGlick/DiscoEval",
|
200 |
-
filename=constants.SP_VALID_NAME,
|
201 |
-
subfolder=subfolder,
|
202 |
-
repo_type="dataset",
|
203 |
-
local_dir='./',
|
204 |
-
)
|
205 |
-
text_url = hf_hub_download(
|
206 |
-
repo_id="OfekGlick/DiscoEval",
|
207 |
-
filename=constants.SP_TEST_NAME,
|
208 |
-
subfolder=subfolder,
|
209 |
repo_type="dataset",
|
210 |
local_dir='./',
|
|
|
211 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
212 |
# data_dir = dl_manager.download_and_extract(urls)
|
213 |
train_name = constants.SP_TRAIN_NAME
|
214 |
valid_name = constants.SP_VALID_NAME
|
@@ -307,11 +313,5 @@ class DiscoEvalSentence(datasets.GeneratorBasedBuilder):
|
|
307 |
|
308 |
|
309 |
if __name__ == '__main__':
|
310 |
-
|
311 |
-
sents = []
|
312 |
-
labels = []
|
313 |
-
for d in data:
|
314 |
-
input1= d[1]
|
315 |
-
input2 = d[2]
|
316 |
-
label = d[0]
|
317 |
ofek = 5
|
|
|
185 |
# data_dir = dl_manager.download_and_extract(urls)
|
186 |
|
187 |
if self.config.name in [constants.SPARXIV, constants.SPROCSTORY, constants.SPWIKI]:
|
188 |
+
# subfolder = os.path.join(constants.SP_DATA_DIR, constants.SP_DIRS[self.config.name])
|
189 |
+
data_dir = constants.SP_DATA_DIR + "/" + constants.SP_DIRS[self.config.name]
|
190 |
+
test_dowload = snapshot_download(
|
191 |
repo_id="OfekGlick/DiscoEval",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
repo_type="dataset",
|
193 |
local_dir='./',
|
194 |
+
ignore_patterns=["*.py", "*.gitignore", "*.gitattributes", "*.DS_Store", "*.md"],
|
195 |
)
|
196 |
+
# train_url = hf_hub_download(
|
197 |
+
# repo_id="OfekGlick/DiscoEval",
|
198 |
+
# filename=constants.SP_TRAIN_NAME,
|
199 |
+
# subfolder=subfolder,
|
200 |
+
# repo_type="dataset",
|
201 |
+
# local_dir='./',
|
202 |
+
# )
|
203 |
+
#
|
204 |
+
# valid_url = hf_hub_download(
|
205 |
+
# repo_id="OfekGlick/DiscoEval",
|
206 |
+
# filename=constants.SP_VALID_NAME,
|
207 |
+
# subfolder=subfolder,
|
208 |
+
# repo_type="dataset",
|
209 |
+
# local_dir='./',
|
210 |
+
# )
|
211 |
+
# text_url = hf_hub_download(
|
212 |
+
# repo_id="OfekGlick/DiscoEval",
|
213 |
+
# filename=constants.SP_TEST_NAME,
|
214 |
+
# subfolder=subfolder,
|
215 |
+
# repo_type="dataset",
|
216 |
+
# local_dir='./',
|
217 |
+
# )
|
218 |
# data_dir = dl_manager.download_and_extract(urls)
|
219 |
train_name = constants.SP_TRAIN_NAME
|
220 |
valid_name = constants.SP_VALID_NAME
|
|
|
313 |
|
314 |
|
315 |
if __name__ == '__main__':
|
316 |
+
temp = os.path.join(constants.SP_DATA_DIR, constants.SP_DIRS[constants.SPARXIV])
|
|
|
|
|
|
|
|
|
|
|
|
|
317 |
ofek = 5
|