I am working on a sentiment prediction problem and I am following the lesson4 notebook and I have built the text prediction piece and that all seems to be working as expected. Now I am trying to do the second part which is use transfer learning to instead of predicting the next work, predict whether the reviewer is happy or not_happy. So I have gotten to this part here and am having trouble converting it into a non-split version.
IMDB_LABEL = data.Field(sequential=False) splits = torchtext.datasets.IMDB.splits(TEXT, IMDB_LABEL, 'data/') md2 = TextData.from_splits(PATH, splits, bs)
So what I currently have is (not working at all currently):
training_data = data.TabularDataset(PATH+"train.csv", "csv", [("User_ID", data.Field()), ("Description", data.Field()), ("Browser_Used", data.Field()), ("Device_Used", data.Field()), ("Is_Response", data.Field(sequential=False))], skip_header=True) md2 = TextData.from_splits(PATH, [training_data], bs, text_name="Description", label_name="Is_Response")
If anybody has any advice here I would really appreciate it!
The reason I got to this point is I know that I won’t be able to use datasets since that is only for torchtexts prebuilt datasets so I believe the solution will be something using data.something, but I haven’t quite put the pieces together yet.