Well, the issue you are seeing currently is that trainer logs the length of valid_loader instead of train_loader, right? I think, there can be a problem with what is assigned with which data. So, my question is, if you add
    # Run the training
    print("Debug: train loader length: ", len(train_loader))
    trainer.run(train_loader, max_epochs=args.n_epochs)

and execute the full code, which value do you see. Trainer should properly run on what is provided. I thinks, valid loader and train loader are mixed somewhere previously…