# Seq2SeqTrainer produces error during validation when using T5

**URL:** <https://discuss.huggingface.co/t/seq2seqtrainer-produces-error-during-validation-when-using-t5/77986>\
**Category:** 🤗Transformers\
**Created:** [March 18, 2024, 7:22pm UTC](https://discuss.huggingface.co/t/seq2seqtrainer-produces-error-during-validation-when-using-t5/77986 "2024-03-18T19:22:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![waxef](https://avatars.discourse-cdn.com/v4/letter/w/b77776/32.png) [@waxef](https://discuss.huggingface.co/u/waxef)\
**Post date:** [March 18, 2024, 7:22pm UTC](https://discuss.huggingface.co/t/seq2seqtrainer-produces-error-during-validation-when-using-t5/77986/1 "2024-03-18T19:22:31Z")

</div>

Following the tutorial [here](https://huggingface.co/docs/transformers/en/tasks/summarization). I’ve tried to adapt it to my dataset.

But, I’ve noticed that during evaluation the `Seq2SeqTrainer` calls the `compute_metrics` `3` times.

The first time it passes the correct validation/test set, but the other `2` times I don’t know what the hell is passing or why is calling the `compute_metrics` `3` times?

 ![image](https://us1.discourse-cdn.com/hellohellohello/original/3X/c/8/c85c6bfda8db97348e8e5371cdee8da530250359.png)
