Train a simple Pytoch model with transformers Trainer

Hello,
I wanted to train a simple Pytoch model(with only one LInear layer) using transformers Trainer.

So I published the results in the repo below.

I was able to train the model successfully, but I was left with one question.

As you can see from the code, if I don’t specify the label_names in TrainingArguments as ‘labels’,
the val loss and compute_metrics functions are not executed during the training process.
‘labels’ is the variable name that the data loader used by the trainer attaches to the labels.

Normal transfomers models work fine without specifying label_names in TrainingArguments.
I would like to know what difference is causing this problem.

Thank you for reading.