afractalthought:

I have actually been confused about how the labels are specified. From what I see, they are only referenced to when using set_format however it looks like columns is actually just a list of column names, and I did not see anywhere in the documentation that implied that Trainer specifically looks for certain columns.


For the labels, Trainer does nothing. It’s the model that expects an argument named labels to compute the loss. Your preprocessing should create that field if it does not exist. The only thing Trainer does is that the default data_collator will rename label and label_ids to labels.
(Asked for someone more familiar with nlp to help with your error.)