| 923 | return self.dataset[self.config.test_split] |
| 924 | |
| 925 | def fewshot_docs(self): |
| 926 | if self.config.fewshot_split is not None: |
| 927 | if self.config.process_docs is not None: |
| 928 | return self.config.process_docs(self.dataset[self.config.fewshot_split]) |
| 929 | return self.dataset[self.config.fewshot_split] |
| 930 | else: |
| 931 | if (self.config.num_fewshot is not None) and (self.config.num_fewshot > 0): |
| 932 | eval_logger.warning( |
| 933 | f"Task '{self.config.task}': " |
| 934 | "num_fewshot > 0 but fewshot_split is None. " |
| 935 | "using preconfigured rule." |
| 936 | ) |
| 937 | return super().fewshot_docs() |
| 938 | |
| 939 | @utils.positional_deprecated |
| 940 | def fewshot_context(self, doc, num_fewshot): |