varora
commited on
Commit
·
e58ee7b
1
Parent(s):
b33c953
update hit.py
Browse files
hit.py
CHANGED
|
@@ -112,8 +112,13 @@ class NewDataset(datasets.GeneratorBasedBuilder):
|
|
| 112 |
# dl_manager is a datasets.download.DownloadManager that can be used to download and extract URLS
|
| 113 |
# 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.
|
| 114 |
# By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
|
| 115 |
-
|
|
|
|
|
|
|
| 116 |
data_urls = _BASE_URL + rel_path
|
|
|
|
|
|
|
|
|
|
| 117 |
print(f"data url: {data_urls}")
|
| 118 |
archive_paths = dl_manager.download(data_urls)
|
| 119 |
print(archive_paths)
|
|
|
|
| 112 |
# dl_manager is a datasets.download.DownloadManager that can be used to download and extract URLS
|
| 113 |
# 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.
|
| 114 |
# By default the archives will be extracted and a path to a cached folder where they are extracted is returned instead of the archive
|
| 115 |
+
splits = ["train", "val", "test"]
|
| 116 |
+
|
| 117 |
+
gender = self.config.name
|
| 118 |
data_urls = _BASE_URL + rel_path
|
| 119 |
+
|
| 120 |
+
data_urls = {split: [os.path.join(gender, split, "*.gz")] for split in splits}
|
| 121 |
+
|
| 122 |
print(f"data url: {data_urls}")
|
| 123 |
archive_paths = dl_manager.download(data_urls)
|
| 124 |
print(archive_paths)
|