How to do prediction on train and validation dataset?

Since we fix the train, validation and test while initialization of the data module. How to specifically test/predict the train and validation dataset without creating a new data module?

One simple way would be to just pass your dataloaders into the respective trainer method:

dataloader = DataLoader(NewDataset())

# or

So you don’t rely on the DataModule you use for training.