This …
data_clas = (TextList
.from_df(train_df, path=path, col=['text'], processor=txt_proc)
.random_split_by_pct(valid_pct=.2)
.label_from_df(cols=['target'])
.add_test(TextList.from_df(test_df, path, col=['text']))
.databunch(bs=50)
)
… fails when training the model but works fine when I remove the test DataFrame.
learn.fit_one_cycle(1, 3e-2, moms=(0.8,0.7))
Error:
I may be formulating my Data Block API code wrong so if anyone can help, much appreciated.