If you would like to fine-tune a custom model with transformers, the name of the target column should be “label“. Let’s see how we can rename column names in HuggingFace Datasets,
import datasets from datasets import load_dataset # load the data dataset = load_dataset('csv', data_files='my_data.csv') # rename the column "target" to "label" dataset = dataset .rename_column('target', 'label')