(self, idx)
| 379 | "dedup": target_item_sid == last_history_item_sid} |
| 380 | |
| 381 | def pre(self, idx): |
| 382 | history = self.get_history(self.data.iloc[idx]) |
| 383 | target_item = history['output'] |
| 384 | history['output'] = '' |
| 385 | |
| 386 | prompt = self.generate_prompt(history) |
| 387 | self.prompt2history[prompt] = history["history_str"] |
| 388 | self.history2target[history["history_str"]] = target_item |
| 389 | |
| 390 | return { |
| 391 | "prompt": prompt, |
| 392 | "completion": target_item, |
| 393 | |
| 394 | } |
| 395 | |
| 396 | |
| 397 | class SidSFTDataset(CSVBaseDataset): |
nothing calls this directly
no test coverage detected