Update xquad_split.py
Browse files- xquad_split.py +8 -6
xquad_split.py
CHANGED
|
@@ -100,30 +100,32 @@ class Xquad(datasets.GeneratorBasedBuilder):
|
|
| 100 |
# TODO(xquad): Downloads the data and defines the splits
|
| 101 |
# dl_manager is a datasets.download.DownloadManager that can be used to
|
| 102 |
# download and extract URLs
|
| 103 |
-
|
|
|
|
|
|
|
| 104 |
downloaded_files = dl_manager.download_and_extract(urls_to_download)
|
| 105 |
|
| 106 |
-
urls_to_download = _URL +
|
| 107 |
downloaded_files = dl_manager.download_and_extract(urls_to_download)
|
| 108 |
|
| 109 |
-
urls_to_download = _URL +
|
| 110 |
downloaded_files = dl_manager.download_and_extract(urls_to_download)
|
| 111 |
|
| 112 |
return [
|
| 113 |
datasets.SplitGenerator(
|
| 114 |
name=datasets.Split.TRAIN,
|
| 115 |
# These kwargs will be passed to _generate_examples
|
| 116 |
-
gen_kwargs={"filepath": os.path.join(data_dir,
|
| 117 |
),
|
| 118 |
datasets.SplitGenerator(
|
| 119 |
name=datasets.Split.VALIDATION,
|
| 120 |
# These kwargs will be passed to _generate_examples
|
| 121 |
-
gen_kwargs={"filepath": os.path.join(data_dir,
|
| 122 |
),
|
| 123 |
datasets.SplitGenerator(
|
| 124 |
name=datasets.Split.TEST,
|
| 125 |
# These kwargs will be passed to _generate_examples
|
| 126 |
-
gen_kwargs={"filepath": os.path.join(data_dir,
|
| 127 |
),
|
| 128 |
]
|
| 129 |
|
|
|
|
| 100 |
# TODO(xquad): Downloads the data and defines the splits
|
| 101 |
# dl_manager is a datasets.download.DownloadManager that can be used to
|
| 102 |
# download and extract URLs
|
| 103 |
+
|
| 104 |
+
|
| 105 |
+
urls_to_download = _URL + _TRAIN_FILE
|
| 106 |
downloaded_files = dl_manager.download_and_extract(urls_to_download)
|
| 107 |
|
| 108 |
+
urls_to_download = _URL + _VALID_FILE
|
| 109 |
downloaded_files = dl_manager.download_and_extract(urls_to_download)
|
| 110 |
|
| 111 |
+
urls_to_download = _URL + _TEST_FILE
|
| 112 |
downloaded_files = dl_manager.download_and_extract(urls_to_download)
|
| 113 |
|
| 114 |
return [
|
| 115 |
datasets.SplitGenerator(
|
| 116 |
name=datasets.Split.TRAIN,
|
| 117 |
# These kwargs will be passed to _generate_examples
|
| 118 |
+
gen_kwargs={"filepath": os.path.join(data_dir, _TRAIN_FILE)},
|
| 119 |
),
|
| 120 |
datasets.SplitGenerator(
|
| 121 |
name=datasets.Split.VALIDATION,
|
| 122 |
# These kwargs will be passed to _generate_examples
|
| 123 |
+
gen_kwargs={"filepath": os.path.join(data_dir, _VALID_FILE)},
|
| 124 |
),
|
| 125 |
datasets.SplitGenerator(
|
| 126 |
name=datasets.Split.TEST,
|
| 127 |
# These kwargs will be passed to _generate_examples
|
| 128 |
+
gen_kwargs={"filepath": os.path.join(data_dir, _TEST_FILE)},
|
| 129 |
),
|
| 130 |
]
|
| 131 |
|