class_docstr: TextClassificationModel to be trained on two- or three-class textual entailment data, to be used for zero shot intent recognition.
class_docstr_tok: ["TextClassificationModel","to","be","trained","on","two-","or","three-class","textual","entailment","data",",","to","be","used","for","zero","shot","intent","recognition","."]
code: def _setup_dataloader_from_config(
      self, cfg: DictConfig
  ) -> "torch.utils.data.DataLoader":
      data_dir = self._cfg.dataset.data_dir
      file_name = cfg.file_name
      input_file = os.path.join(data_dir, file_name)
      if not os.path.exists(input_file):
          raise FileNotFoundError(
              f"File {input_file} not found. Please check file paths and file names in the config."
          )
  
      dataset = ZeroShotIntentDataset(
          file_path=input_file,
          tokenizer=self.tokenizer,
          max_seq_length=self._cfg.dataset.max_seq_length,
          sent1_col=self._cfg.dataset.sentence_1_column,
          sent2_col=self._cfg.dataset.sentence_2_column,
          label_col=self._cfg.dataset.label_column,
          num_classes=self.cfg.dataset.num_classes,
          use_cache=self._cfg.dataset.use_cache,
      )
  
      return torch.utils.data.DataLoader(
          dataset=dataset,
          collate_fn=dataset.collate_fn,
          batch_size=cfg.batch_size,
          shuffle=cfg.shuffle,
          num_workers=cfg.get("num_workers", 0),
          pin_memory=cfg.get("pin_memory", False),
          drop_last=cfg.get("drop_last", False),
      )
  
imports: import os
  from typing import Dict, List, Optional, Union
  import numpy
  import torch
  from omegaconf import DictConfig
  from pytorch_lightning import Trainer
  from nemo.collections.nlp.data.zero_shot_intent_recognition.zero_shot_intent_dataset import ZeroShotIntentDataset, ZeroShotIntentInferenceDataset, calc_class_weights_from_dataloader
  from nemo.collections.nlp.models import TextClassificationModel
  from nemo.core.classes.common import PretrainedModelInfo
  from nemo.utils import logging
label_desc: Use image node_id 2 for calling the ZeroShotIntentModel obj's underlying member method code with example usage: obj._setup_dataloader_from_config(cfg) and returns: torch