Instead of processing lazily, we turn the iterable into a list.
(self, sample: LabelSample)
| 141 | yield self.pad_seq(prompt_tokens, label, extra=sample.extra) |
| 142 | |
| 143 | def process_sample_strict(self, sample: LabelSample) -> List[Dict[str, List[int]]]: |
| 144 | """ |
| 145 | Instead of processing lazily, we turn the iterable into a list. |
| 146 | """ |
| 147 | if sample is None: |
| 148 | return None |
| 149 | |
| 150 | return list(self.process_sample(sample)) |
| 151 | |
| 152 | def process_sample_(self, sample) -> List[Dict[str, List[int]]]: |
| 153 | prompt_sample = self._preprocess(sample) |
no test coverage detected