# Is the eval dataset shuffled in the Trainer class?

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fis-the-eval-dataset-shuffled-in-the-trainer-class%2F45187%3E%5C
**Category:** Beginners\
**Created:** [June 30, 2023, 7:56pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fis-the-eval-dataset-shuffled-in-the-trainer-class%2F45187 "2023-06-30T19:56:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![antolin](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/antolin/32/17259_2.png) [@antolin](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fantolin)%5C
**Post date:** [June 30, 2023, 7:56pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fis-the-eval-dataset-shuffled-in-the-trainer-class%2F45187%2F1 "2023-06-30T19:56:26Z")

</div>

When training using the Trainer object, I know that the training dataset is shuffled after each epoch. So I was wondering if the same happens with the eval dataset. In my mind, there is no motivation to shuffle it.

---

<div class="post-metadata">

**Author:** ![ilija-ja](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/ilija-ja/32/18658_2.png) [@ilija-ja](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Filija-ja)%5C
**Post date:** [April 12, 2024, 1:28am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fis-the-eval-dataset-shuffled-in-the-trainer-class%2F45187%2F2 "2024-04-12T01:28:37Z")

</div>

Any resolution of this ? I see the SequentailSampler being used on id `_get_eval_sampler` in Trainer but not sure if the data gets shuffled.
