code: def __init__(
      self,
      train: DictConfig,
      validation: Optional[DictConfig] = None,
      test: Optional[DictConfig] = None,
      skip_val_loader: bool = False,
      dummy: bool = False,
  ):
      super().__init__()
      self.train_config = train
      assert (
          "datapipeline" in self.train_config
          and "loader" in self.train_config
      ), "train config requires the fields `datapipeline` and `loader`"
  
      self.val_config = validation
      if not skip_val_loader:
          if self.val_config is not None:
              assert (
                  "datapipeline" in self.val_config
                  and "loader" in self.val_config
              ), "validation config requires the fields `datapipeline` and `loader`"
          else:
              print(
                  "Warning: No Validation datapipeline defined, using that one from training"
              )
              self.val_config = train
  
      self.test_config = test
      if self.test_config is not None:
          assert (
              "datapipeline" in self.test_config
              and "loader" in self.test_config
          ), "test config requires the fields `datapipeline` and `loader`"
  
      self.dummy = dummy
      if self.dummy:
          print("#" * 100)
          print("USING DUMMY DATASET: HOPE YOU'RE DEBUGGING ;)")
          print("#" * 100)
  
file_path: generative-models/sgm/data/dataset.py
imports: from typing import Optional
  import torchdata.datapipes.iter
  import webdataset
  from omegaconf import DictConfig
  from pytorch_lightning import LightningDataModule
label_desc: Use image node_id 1 to create a new StableDataModuleFromConfig object from inherited base classes: LightningDataModule with example: obj = StableDataModuleFromConfig(train, validation, test, skip_val_loader, dummy)