:return: Iterable[obj] A iterable of any object, that doc_to_text can handle
(self)
| 295 | return [] |
| 296 | |
| 297 | def fewshot_docs(self): |
| 298 | """ |
| 299 | :return: Iterable[obj] |
| 300 | A iterable of any object, that doc_to_text can handle |
| 301 | """ |
| 302 | if self.has_training_docs(): |
| 303 | return self.training_docs() |
| 304 | elif self.has_validation_docs(): |
| 305 | return self.validation_docs() |
| 306 | else: |
| 307 | eval_logger.warning( |
| 308 | f"[Task: {self.config.task}] has_training_docs and has_validation_docs are False" |
| 309 | ", using test_docs as fewshot_docs but this is not recommended." |
| 310 | ) |
| 311 | return self.test_docs() |
| 312 | |
| 313 | def _process_doc(self, doc): |
| 314 | """ |
no test coverage detected