class_docstr: Base class for encoder decoder RNNT-based models.
class_docstr_tok: ["Base","class","for","encoder","decoder","RNNT-based","models","."]
docstr: Sets up the training data loader via a Dict-like object.
  
  Args:
      train_data_config: A config that contains the information regarding construction
          of an ASR Training dataset.
  
  Supported Datasets:
      -   :class:`~nemo.collections.asr.data.audio_to_text.AudioToCharDataset`
      -   :class:`~nemo.collections.asr.data.audio_to_text.AudioToBPEDataset`
      -   :class:`~nemo.collections.asr.data.audio_to_text.TarredAudioToCharDataset`
      -   :class:`~nemo.collections.asr.data.audio_to_text.TarredAudioToBPEDataset`
      -   :class:`~nemo.collections.asr.data.audio_to_text_dali.AudioToCharDALIDataset`
docstr_tok: ["Sets","up","the","training","data","loader","via","a","Dict-like","object",".","Args",":","train_data_config",":","A","config","that","contains","the","information","regarding","construction","of","an","ASR","Training","dataset",".","Supported","Datasets",":","-",":","class",":","`","~nemo.collections.asr.data.audio_to_text.AudioToCharDataset","`","-",":","class",":","`","~nemo.collections.asr.data.audio_to_text.AudioToBPEDataset","`","-",":","class",":","`","~nemo.collections.asr.data.audio_to_text.TarredAudioToCharDataset","`","-",":","class",":","`","~nemo.collections.asr.data.audio_to_text.TarredAudioToBPEDataset","`","-",":","class",":","`","~nemo.collections.asr.data.audio_to_text_dali.AudioToCharDALIDataset","`"]
code: def setup_training_data(
      self, train_data_config: Optional[Union[DictConfig, Dict]]
  ):
      """
      Sets up the training data loader via a Dict-like object.
  
      Args:
          train_data_config: A config that contains the information regarding construction
              of an ASR Training dataset.
  
      Supported Datasets:
          -   :class:`~nemo.collections.asr.data.audio_to_text.AudioToCharDataset`
          -   :class:`~nemo.collections.asr.data.audio_to_text.AudioToBPEDataset`
          -   :class:`~nemo.collections.asr.data.audio_to_text.TarredAudioToCharDataset`
          -   :class:`~nemo.collections.asr.data.audio_to_text.TarredAudioToBPEDataset`
          -   :class:`~nemo.collections.asr.data.audio_to_text_dali.AudioToCharDALIDataset`
      """
      if "shuffle" not in train_data_config:
          train_data_config["shuffle"] = True
  
      # preserve config
      self._update_dataset_config(
          dataset_name="train", config=train_data_config
      )
  
      self._train_dl = self._setup_dataloader_from_config(
          config=train_data_config
      )
  
      # Need to set this because if using an IterableDataset, the length of the dataloader is the total number
      # of samples rather than the number of batches, and this messes up the tqdm progress bar.
      # So we set the number of steps manually (to the correct number) to fix this.
      if (
          self._train_dl is not None
          and hasattr(self._train_dl, "dataset")
          and isinstance(
              self._train_dl.dataset, torch.utils.data.IterableDataset
          )
      ):
          # We also need to check if limit_train_batches is already set.
          # If it's an int, we assume that the user has set it to something sane, i.e. <= # training batches,
          # and don't change it. Otherwise, adjust batches accordingly if it's a float (including 1.0).
          if self._trainer is not None and isinstance(
              self._trainer.limit_train_batches, float
          ):
              self._trainer.limit_train_batches = int(
                  self._trainer.limit_train_batches
                  * ceil(
                      (len(self._train_dl.dataset) / self.world_size)
                      / train_data_config["batch_size"]
                  )
              )
          elif self._trainer is None:
              logging.warning(
                  "Model Trainer was not set before constructing the dataset, incorrect number of "
                  "training batches will be used. Please set the trainer and rebuild the dataset."
              )
  
imports: import copy
  import json
  import os
  import tempfile
  from math import ceil
  from typing import Dict, List, Optional, Tuple, Union
  import torch
  from omegaconf import DictConfig, OmegaConf, open_dict
  from pytorch_lightning import Trainer
  from tqdm.auto import tqdm
  from nemo.collections.asr.data import audio_to_text_dataset
  from nemo.collections.asr.data.audio_to_text_dali import AudioToCharDALIDataset, DALIOutputs
  from nemo.collections.asr.data.audio_to_text_lhotse import LhotseSpeechToTextBpeDataset
  from nemo.collections.asr.losses.rnnt import RNNTLoss, resolve_rnnt_default_loss_name
  from nemo.collections.asr.metrics.wer import WER
  from nemo.collections.asr.models.asr_model import ASRModel, ExportableEncDecModel
  from nemo.collections.asr.modules.rnnt import RNNTDecoderJoint
  from nemo.collections.asr.parts.mixins import ASRModuleMixin
  from nemo.collections.asr.parts.submodules.rnnt_decoding import RNNTDecoding, RNNTDecodingConfig
  from nemo.collections.asr.parts.utils.audio_utils import ChannelSelectorType
  from nemo.collections.common.data.lhotse import get_lhotse_dataloader_from_config
  from nemo.collections.common.parts.preprocessing.parsers import make_parser
  from nemo.core.classes.common import PretrainedModelInfo, typecheck
  from nemo.core.classes.mixins import AccessMixin
  from nemo.core.neural_types import AcousticEncodedRepresentation, AudioSignal, LengthsType, NeuralType, SpectrogramType
  from nemo.utils import logging
label_desc: Use image node_id 8 for calling the EncDecRNNTModel obj's underlying member method code with example usage: obj.setup_training_data(train_data_config) without return types