(self, dataset, split="train")
| 78 | |
| 79 | class TextPromptDataset(Dataset): |
| 80 | def __init__(self, dataset, split="train"): |
| 81 | self.file_path = os.path.join(dataset, f"{split}.txt") |
| 82 | with open(self.file_path, "r") as f: |
| 83 | self.prompts = [line.strip() for line in f.readlines()] |
| 84 | |
| 85 | def __len__(self): |
| 86 | return len(self.prompts) |
nothing calls this directly
no outgoing calls
no test coverage detected