:return: Iterable[obj] A iterable of any object, that doc_to_text can handle
(self)
| 202 | return [] |
| 203 | |
| 204 | def fewshot_docs(self) -> Iterable: |
| 205 | """ |
| 206 | :return: Iterable[obj] |
| 207 | A iterable of any object, that doc_to_text can handle |
| 208 | """ |
| 209 | if self.has_training_docs(): |
| 210 | return self.training_docs() |
| 211 | elif self.has_validation_docs(): |
| 212 | return self.validation_docs() |
| 213 | else: |
| 214 | if self.config.get("num_fewshot", 0) > 0: |
| 215 | eval_logger.warning( |
| 216 | f"[Task: {self.config.task}] has_training_docs and has_validation_docs are False" |
| 217 | ", using test_docs as fewshot_docs but this is not recommended." |
| 218 | ) |
| 219 | return self.test_docs() |
| 220 | |
| 221 | def _process_doc(self, doc: dict) -> dict: |
| 222 | """ |
no test coverage detected