(self, idx)
| 42 | return len(self.data) |
| 43 | |
| 44 | def __getitem__(self, idx): |
| 45 | item = self.data.iloc[idx].to_dict() |
| 46 | item.update(self.encode_prefix(item["nums"], item["target"])) |
| 47 | return item |
| 48 | |
| 49 | def encode_prefix(self, numbers: List[int], target: int): |
| 50 | """Prefix is the *actual* input to the model.""" |
nothing calls this directly
no test coverage detected