Not getting predictions for NLP model get_preds

I have built a Text Classification model which gets categories (such as 1,2,3 …) for a chunk of text
My learner is all set up, but I am finding it difficult to get predictions on my test set (in a separate file test.csv)

What I did was

learn_classifier.dls.test_dl = test_df
preds, target = learn_classifier.get_preds(learn_classifier.dls.test_dl)
labels = preds.numpy()

This kills the kernel every time. I saw earlier versions of fastai making use of this and succeeding but I don’t know how to proceed.

Going by

 preds, target = learn_classifier.get_preds(DatasetType.Test, ordered=True)
labels = preds.numpy()

gives the error NameError: name 'DatasetType' is not defined
(this error is the reason why I tried the first approach, but in vain)

Basically I want to implement the final step in this notebook, (cell [38]) they have done
preds, target = learn.get_preds(DatasetType.Test, ordered=True) labels = preds.numpy()

Here are some answers which did not work for me

@muellerzr had some answers to this in