Non shuffle training

Hi there,

In order to debug something I need to make data non-shuffle. Can you please tell me how to turn off the shuffle?

I am using from transformers import Trainer for training and from datasets import load_dataset for data loading with default arguments.

There is no option to do this natively in the Trainer, you can either make a source install and change the line that creates the training dataloader, or subclass Trainer and override the get_train_dataloader method.

3 Likes

Refer to thread here: How to ensure the dataset is shuffled for each epoch using Trainer and Datasets? - #3 by lhoestq

As non-shuffling is a minor demand from users, the Trainer class doesn’t provide this option to avoid careless users making mistakes.