Instead of processing lazily, we turn the iterable into a list.
(self, sample: PromptSample)
| 64 | yield self.pad_seq(prompt_tokens, code_tokens, extra=sample.extra) |
| 65 | |
| 66 | def process_sample_strict(self, sample: PromptSample) -> List[Dict[str, List[int]]]: |
| 67 | """ |
| 68 | Instead of processing lazily, we turn the iterable into a list. |
| 69 | """ |
| 70 | if sample is None: |
| 71 | return None |
| 72 | |
| 73 | return list(self.process_sample(sample)) |
| 74 | |
| 75 | def process_sample_(self, sample) -> List[Dict[str, List[int]]]: |
| 76 | prompt_sample = self._preprocess(sample) |
no test coverage detected