adjust dlmanager urls
Browse files
climate-fever-nli-stsb.py
CHANGED
@@ -50,6 +50,7 @@ _URLS = {
|
|
50 |
|
51 |
_DATAFILES = {
|
52 |
'cf-nli': {
|
|
|
53 |
'zip_path': './cf-nli.zip',
|
54 |
'filename': {
|
55 |
'train': 'train.tsv',
|
@@ -58,6 +59,7 @@ _DATAFILES = {
|
|
58 |
}
|
59 |
},
|
60 |
'cf-nli-nei': {
|
|
|
61 |
'zip_path': './cf-nli-nei.zip',
|
62 |
'filename': {
|
63 |
'train': 'train.tsv',
|
@@ -66,6 +68,7 @@ _DATAFILES = {
|
|
66 |
}
|
67 |
},
|
68 |
'cf-stsb': {
|
|
|
69 |
'zip_path': './cf-stsb.zip',
|
70 |
'filename': {
|
71 |
'train': 'train.tsv',
|
@@ -141,9 +144,10 @@ class ClimateFeverNliStsb(datasets.GeneratorBasedBuilder):
|
|
141 |
# It can accept any type or nested list/dict and will give back the same structure with the url replaced with path to local files.
|
142 |
# By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
|
143 |
datapath = _DATAFILES[self.config.name]
|
|
|
144 |
zipfile = datapath['zip_path']
|
145 |
filename = datapath['filename']
|
146 |
-
data_dir = dl_manager.
|
147 |
return [
|
148 |
datasets.SplitGenerator(
|
149 |
name=datasets.Split.TRAIN,
|
|
|
50 |
|
51 |
_DATAFILES = {
|
52 |
'cf-nli': {
|
53 |
+
'url': 'https://huggingface.co/datasets/slhenty/climate-fever-nli-stsb/resolve/main/cf-nli.zip'
|
54 |
'zip_path': './cf-nli.zip',
|
55 |
'filename': {
|
56 |
'train': 'train.tsv',
|
|
|
59 |
}
|
60 |
},
|
61 |
'cf-nli-nei': {
|
62 |
+
'url': 'https://huggingface.co/datasets/slhenty/climate-fever-nli-stsb/resolve/main/cf-nli-nei.zip'
|
63 |
'zip_path': './cf-nli-nei.zip',
|
64 |
'filename': {
|
65 |
'train': 'train.tsv',
|
|
|
68 |
}
|
69 |
},
|
70 |
'cf-stsb': {
|
71 |
+
'url': 'https://huggingface.co/datasets/slhenty/climate-fever-nli-stsb/resolve/main/cf-stsb.zip'
|
72 |
'zip_path': './cf-stsb.zip',
|
73 |
'filename': {
|
74 |
'train': 'train.tsv',
|
|
|
144 |
# It can accept any type or nested list/dict and will give back the same structure with the url replaced with path to local files.
|
145 |
# By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
|
146 |
datapath = _DATAFILES[self.config.name]
|
147 |
+
url = datapath['url']
|
148 |
zipfile = datapath['zip_path']
|
149 |
filename = datapath['filename']
|
150 |
+
data_dir = dl_manager.download_and_extract(url)
|
151 |
return [
|
152 |
datasets.SplitGenerator(
|
153 |
name=datasets.Split.TRAIN,
|