(solved) Trainer.fit, trainer.test don't use val_loader or test_loader

I have a problem that when using trainer.fit(model), my def val_loader is never used, only train_loader
Also when using trainer.test(model), my def val_loader and def test_loader are never used, only train_loader.
How do I change this? I cant share code but the structure is like this:

  1. imports
  2. class modelModule(LightningModule)
    def model

    def training_step
    def validation_step
    def validation_epoch_end
    def test_step
    def test_end
    def train_dataloader
    def val_dataloader
    def test_dataloader
  3. if name == “main”:
    model = modelModule()
    trainer.Trainer(gpus=1, max_epochs=20, num_nodes=1, precision=16, overfit_batches=1)
    trainer.fit(model)
    trainer.test(model)

SOLUTION: not use “overfit_batches” in trainer

Hello, my apology for the late reply. We are slowly converging to deprecate this forum in favor of the GH build-in version… Could we kindly ask you to recreate your question there - Lightning Discussions