(self, tokenizer, type_path, num_samples, input_length, output_length, print_text=False)
| 25 | |
| 26 | class wikihow(Dataset): |
| 27 | def __init__(self, tokenizer, type_path, num_samples, input_length, output_length, print_text=False): |
| 28 | self.dataset = load_dataset('wikihow', 'all', data_dir='data/', split=type_path) |
| 29 | if num_samples: |
| 30 | self.dataset = self.dataset.select(list(range(0, num_samples))) |
| 31 | self.input_length = input_length |
| 32 | self.tokenizer = tokenizer |
| 33 | self.output_length = output_length |
| 34 | self.print_text = print_text |
| 35 | |
| 36 | def __len__(self): |
| 37 | return self.dataset.shape[0] |
nothing calls this directly
no outgoing calls
no test coverage detected