question: Do LightningDataModule support multi train dataloader like LightningModule?
context: Can I define multi training dataloaders in LightningDataModule?
      def train_dataloader(self):
          lab_loader = torch.utils.data.DataLoader(
                           self.train_subset_lab_train,
                           batch_size=self.batch_size,
                           shuffle=True,
                           num_workers=self.num_workers,
                           pin_memory=True,
                           drop_last=True,
                      )
          unlab_loader = torch.utils.data.DataLoader(
                           self.train_subset_unlab_train,
                           batch_size=self.batch_size*self.uratio,
                           shuffle=True,
                           num_workers=self.num_workers,
                           pin_memory=True,
                           drop_last=True,
                      )
  
          return [lab_loader, unlab_loader]
answer: @kleinzcy @tshu-w,
  PyTorch Lightning supports multiple data loaders but they will be sampled at the same time and return a batch composed of a batch sample for each dataloaders return for the train_dataloader method.
  Alternatively, if you want to make this sequential, you can implement a wrapper which will sample from one and the other dataloader.
  class SequentialLoader(Iterator):
  
      def __init__(self, *dataloaders):
          self.dataloaders = dataloaders
  
      def __len__(self):
          return sum([len(dl) for dl in self.dataloaders])
  
      def __iter__(self):
          for dl in self.dataloaders:
              dataloader_iter = iter(dl)
              for batch in dataloader_iter:
                  yield batch