class_docstr: Handles iterating over epoch-level `tp.Iterator` objects.
class_docstr_tok: ["Handles","iterating","over","epoch-level","`","tp.Iterator","`","objects","."]
code: def __init__(
      self,
      x,
      y=None,
      sample_weight=None,
      batch_size=None,
      steps_per_epoch=None,
      initial_epoch=0,
      epochs=1,
      shuffle=False,
      class_weight=None,
      **kwargs,
  ):
      self._initial_epoch = initial_epoch
      self._epochs = epochs
      self._insufficient_data = False
  
      adapter_cls = select_data_adapter(x, y)
      self._adapter = adapter_cls(
          x,
          y,
          batch_size=batch_size,
          steps=steps_per_epoch,
          epochs=epochs - initial_epoch,
          sample_weights=sample_weight,
          shuffle=shuffle,
          **kwargs,
      )
  
      dataset = self._adapter.get_dataset()
  
      self._inferred_steps = self._infer_steps(steps_per_epoch, dataset)
      self._dataset = dataset
  
file_path: elegy/elegy/data/data_handler.py
imports: import contextlib
  import logging
  from .array_adapter import ArrayDataAdapter
  from .dataset import DataLoaderAdapter
  from .generator_adapter import GeneratorDataAdapter
  from .list_adapter import ListsOfScalarsDataAdapter
label_desc: Use image node_id 1 to create a new DataHandler object from inherited base classes: object with example: obj = DataHandler(x, y, sample_weight, batch_size, steps_per_epoch, initial_epoch, epochs, shuffle, class_weight)