DataLoader Implicitly trying to call CUDA

I have been trying to use dataloader to load data but while accessing the batch it implictly calls CUDA and while I am working on CPU and have no GPU access.

I have tried to use collate_fn as well but it didn’t work. Does anyone have any solution on how to keep the batch in CPU only and avoid GPU calls.

Hi ! Not 100% sure to know what’s going here, but can you check that you’re able to instantiate a torch tensor from a numpy array in your environment ? And that you didn’t pass any device= parameter to encoded_dataset.with_format() ?