Creating a Multi-Label torchtext Dataset

If all the labels are processed in the same way (e.g. if they are all labels of 1s and 0s) then you only need to create a single field.
I think it would be easier overall to just write the dataframes to disk as csv files and read them using the TabularDataset.
Do you happen to be working on the toxic comment classification competition for Kaggle? I’ve written a tutorial on using torchtext for text classification here that uses the exact same dataset. I hope it can help!

3 Likes