class_docstr: Designed for classification tasks such as intent/domain classification as well as slot tagging
  
  Dataset Class 
      1. Performs Model-dependent (but Data-independent) operations (tokenization etc)
      2. This can allow the same model preprocessing for multiple datasources
      3. Users can configurate which labels to use for modelling 
          (e.g. intent classification, slot filling or both together etc)
class_docstr_tok: ["Designed","for","classification","tasks","such","as","intent\/domain","classification","as","well","as","slot","tagging","Dataset","Class","1",".","Performs","Model-dependent","(","but","Data-independent",")","operations","(","tokenization","etc",")","2",".","This","can","allow","the","same","model","preprocessing","for","multiple","datasources","3",".","Users","can","configurate","which","labels","to","use","for","modelling","(","e.g",".","intent","classification",",","slot","filling","or","both","together","etc",")"]
docstr: Constructor
  Args:
      dataset_split: dataset split
      dialogues_processor: Data generator for SGD dialogues
      tokenizer: tokenizer
      cfg: cfg container for dataset
docstr_tok: ["Constructor","Args",":","dataset_split",":","dataset","split","dialogues_processor",":","Data","generator","for","SGD","dialogues","tokenizer",":","tokenizer","cfg",":","cfg","container","for","dataset"]
code: def __init__(
      self,
      dataset_split: str,
      dialogues_processor: object,
      tokenizer,
      cfg,
  ):
      """Constructor
      Args:
          dataset_split: dataset split
          dialogues_processor: Data generator for SGD dialogues
          tokenizer: tokenizer
          cfg: cfg container for dataset
      """
      self.cfg = cfg
  
      if (
          self.cfg.target_template == "with_slots"
          and self.cfg.eval_mode != "generation"
      ):
          raise ValueError(
              "slot-filling is not supported by eval_mode {}, please set model.dataset.eval_mode=generation instead".format(
                  self.cfg.eval_mode
              )
          )
      if (
          self.cfg.target_template != "with_slots"
          and self.cfg.field == "slots"
      ):
          raise ValueError(
              "please set model.dataset.target_template='with_slots' if model.dataset.field='slots'"
          )
      self.label_type = self.cfg.field
      if self.cfg.target_template == "with_description":
          self.label_to_description = defaultdict(str)
      self.all_possible_labels = set()
      self.tokenizer = tokenizer
      self.tokenizer.tokenizer.padding_side = "right"
      self.max_candidates = 2
      if not isinstance(dataset_split, str):
          dataset_split = dataset_split[0]
      self.features = dialogues_processor.get_dialog_examples(
          dataset_split
      )
      for idx in range(len(self.features)):
          self.preprocess_feature(idx)
      if self.cfg.debug_mode:
          self.features = self.features[:16]
      # for few shot learning to append in the prompt
      self.lm_features = self.get_lm_samples()
  
file_path: NeMo/nemo/collections/nlp/data/dialogue/dataset/dialogue_gpt_classification_dataset.py
imports: import copy
  import random
  from collections import defaultdict
  import torch
  from nemo.collections.nlp.data.dialogue.dataset.dialogue_dataset import DialogueDataset
  from nemo.utils import logging
label_desc: Use image node_id 1 to create a new DialogueGPTClassificationDataset object from inherited base classes: DialogueDataset with example: obj = DialogueGPTClassificationDataset(dataset_split, dialogues_processor, tokenizer, cfg)