Simplest way to get batch prediction?

From what I understood from https://docs.fast.ai/basic_train.html#Learner.get_preds, the get_preds only works within the dataset used for training and validation/tests. But I guess I could set the data property inside the exported model and call .get_preds()