class_docstr: T5-based grapheme-to-phoneme model.
docstr: Setup function for a infer data loader.
  Returns:
      A pytorch DataLoader.
docstr_tok: ["Setup","function","for","a","infer","data","loader",".","Returns",":","A","pytorch","DataLoader","."]
code: def _setup_infer_dataloader(
      self, cfg
  ) -> "torch.utils.data.DataLoader":
      """
      Setup function for a infer data loader.
      Returns:
          A pytorch DataLoader.
      """
      dataset = T5G2PDataset(
          manifest_filepath=cfg.manifest_filepath,
          tokenizer=self._tokenizer,
          max_source_len=self._tokenizer.model_max_length,
          max_target_len=-1,
          do_lower=self.do_lower,
          grapheme_field=cfg.get("grapheme_field", "text_graphemes"),
          with_labels=False,
      )
  
      return torch.utils.data.DataLoader(
          dataset,
          collate_fn=dataset.collate_fn,
          batch_size=cfg.batch_size,
          shuffle=False,
          num_workers=cfg.num_workers,
          drop_last=False,
      )
  
imports: from dataclasses import dataclass
  from typing import Any, Dict, List, Optional, Union
  import torch
  from hydra.utils import instantiate
  from omegaconf import DictConfig, OmegaConf
  from pytorch_lightning import Trainer
  from transformers import AutoTokenizer, T5ForConditionalGeneration
  from nemo.collections.asr.metrics.wer import word_error_rate
  from nemo.collections.tts.g2p.data.t5 import T5G2PDataset
  from nemo.collections.tts.models.base import G2PModel
  from nemo.core.classes.common import PretrainedModelInfo, typecheck
  from nemo.core.neural_types import LabelsType, LossType, MaskType, NeuralType, TokenIndex
  from nemo.utils import logging
label_desc: Use image node_id 7 for calling the T5G2PModel obj's underlying member method code with example usage: obj._setup_infer_dataloader(cfg) and returns: torch