class_docstr: Context manager base class for data module/loader implementations.
code: def __init__(
      self,
      train_dir: str,
      val_dir: str,
      num_train_epochs: int = 1,
      has_val: bool = True,
      train_batch_size: int = 32,
      val_batch_size: int = 32,
      shuffle: bool = True,
      transform_fn=None,
      inmemory_cache_all=False,
      cur_shard: int = 0,
      shard_count: int = 1,
      schema_fields=None,
      storage_options=None,
      steps_per_epoch_train: int = 1,
      steps_per_epoch_val: int = 1,
      verbose=True,
      **kwargs,
  ):
      super().__init__()
      self.train_dir = train_dir
      self.val_dir = val_dir
      self.num_train_epochs = num_train_epochs
      self.has_val = has_val
      self.train_batch_size = train_batch_size
      self.val_batch_size = val_batch_size
      self.shuffle = shuffle
      self.transform_fn = transform_fn
      self.inmemory_cache_all = inmemory_cache_all
      self.cur_shard = cur_shard
      self.shard_count = shard_count
      self.schema_fields = schema_fields
      self.storage_options = storage_options
      self.steps_per_epoch_train = steps_per_epoch_train
      self.steps_per_epoch_val = steps_per_epoch_val
      self.verbose = verbose
  
file_path: horovod/horovod/spark/common/datamodule.py
imports: from abc import ABC, abstractmethod
label_desc: Use image node_id 1 to create a new DataModule object from inherited base classes: ABC with example: obj = DataModule(train_dir, val_dir, num_train_epochs, has_val, train_batch_size, val_batch_size, shuffle, transform_fn, inmemory_cache_all, cur_shard, shard_count, schema_fields, storage_options, steps_per_epoch_train, steps_per_epoch_val, verbose)