(self, dl_manager)
| 157 | ) |
| 158 | |
| 159 | def _split_generators(self, dl_manager): |
| 160 | urls = {"train": _URLS["train"], "validation": _URLS["validation"]} |
| 161 | data_dirs = dl_manager.download_and_extract(urls) |
| 162 | return [ |
| 163 | datasets.SplitGenerator( |
| 164 | name=datasets.Split.TRAIN, |
| 165 | # These kwargs will be passed to _generate_examples |
| 166 | gen_kwargs={ |
| 167 | "filepath": data_dirs["train"], |
| 168 | "split": datasets.Split.TRAIN, |
| 169 | }, |
| 170 | ), |
| 171 | datasets.SplitGenerator( |
| 172 | name=datasets.Split.VALIDATION, |
| 173 | # These kwargs will be passed to _generate_examples |
| 174 | gen_kwargs={ |
| 175 | "filepath": data_dirs["validation"], |
| 176 | "split": datasets.Split.VALIDATION, |
| 177 | }, |
| 178 | ), |
| 179 | ] |
| 180 | |
| 181 | # method parameters are unpacked from `gen_kwargs` as given in `_split_generators` |
| 182 | def _generate_examples(self, filepath, split): |
nothing calls this directly
no outgoing calls
no test coverage detected