Lesson 10; Issues with inspecting errors

This post is dealing with the last section (titled Classifier) of lesson 10 notebook. I used some of my own data to train a text classifier and (as in lesson 1) tried to go in and see examples of correctly and incorrectly classified texts. However, I run into the following problem that starts with:

val_labels == learn.predict_with_targs()[1] returning False

This is because of the sortish sampler, if I turn the sampling in the model data object to None, this does not happen. The issue this causes is that my predictions learn.predict() corresponds to the shuffled data ; but I’m not sure how to unshuffle the labels so that I can tie it back to the original text (to see which were misclassified). I have tried looking at (md.val_dl.dataset.x, md.val_dl.dataset.y ) but this turns out to be the unshuffled data (the same as val_clas, val_labels). Appreciate any help!