(element)
| 134 | """pre-tokenize the dataset before training; only collate during training""" |
| 135 | |
| 136 | def tokenize(element): |
| 137 | outputs = tokenizer( |
| 138 | element[dataset_text_field], |
| 139 | padding=False, |
| 140 | ) |
| 141 | return {"input_ids": outputs["input_ids"]} |
| 142 | |
| 143 | return dataset.map( |
| 144 | tokenize, |
nothing calls this directly
no outgoing calls
no test coverage detected