Error occurs in LanguageModelData.from_text_files

So i was trying to do the imdb sentiment analysis but suddenly some error occurs and i can’t seem debug it

I don’t seem to understand why this error is occuring please help

@n00b_1o1 The error message indicates that the device number is negative.
You are using the old library, there is a statement there

nums = fld.numericalize([text],device=None if torch.cuda.is_available() else -1)

If that sets the device to -1, then you get the Runtime error.

I think that is deprecated now, so you may want to use instead…

1 Like

thanks it did worked