Fastai.text DataLoader missing in v1

I am working on a NLP problem where I am trying to apply fastai.text (and then try transfer learning :slight_smile: ).

After tokenization and numericalization, I need to create my batches, and I would like to use fastai’s DataLoader for a more convenient padding. I tried using an approach similar to the code in lesson 10 but, unfortunatelly, some details have changed with fastai version 1.

In particular, I can only find a reference to DataLoader in the master/old folder of Github, so I was wondering where the new version of this class is now, or if the use has changed somehow?

Thank you for your help!

1 Like

The whole notebook is way easier now. There is a version on a sample of IMDB here and the latest version is in the course-v3 repo.

1 Like

Thanks for pointing in the right direction!

I take from your reply that Fastai’s DataLoader is now deprecated (I thought it was useful!) so as a quick check I simply copied the old DataLoader from fastai/old to my repository (and it works).

Now I will have to take a deep breath and dive into the new stuff :slight_smile:

I’m unsure what you call the fastai DataLoader. We use the pytorch DataLoader class which does the same thing as the old fastai DataLoader, minus the padding, but you have collate functions in fastai to help.

I mean the class here (which, yes, is essentially PyTorch’s).

I tried looking for “np_collate” in fastai’s Github, but only found the reference in DataLoader (in fastai/old); where are the new collate functions?

Sorry for the rather trivial questions, I am still learning to navigate PyTorch and Fastai :sweat_smile: