How is loss and eval_loss calculated?

Hi,
I am trying to finetune Salesforce/codet5p-770m on MBPP dataset.
I am using the Seq2SeqTrainer class for this.
I want to know how the loss and eval_loss after every epoch are calculated.