class_docstr: Data Processor for Mellon QA dialogues. 
      
class_docstr_tok: ["Data","Processor","for","Mellon","QA","dialogues","."]
docstr: Process raw files into DialogueInputExample
  Args: 
      dataset_split: {train, dev, test}
  For the Mellon QA dataset, there is no explicit dev set (instead uses the test set as the dev set)
  Therefore, this function creates a dev set and a new train set from the train set.
  Dev set contains self.cfg.dev_proportion % of samples with the rest going into the train set
  Test set contains the whole dataset (Dev + Train) as this dataset is small (~100) and primarily used in a zero shot setting
docstr_tok: ["Process","raw","files","into","DialogueInputExample","Args",":","dataset_split",":","{","train",",","dev",",","test","}","For","the","Mellon","QA","dataset",",","there","is","no","explicit","dev","set","(","instead","uses","the","test","set","as","the","dev","set",")","Therefore",",","this","function","creates","a","dev","set","and","a","new","train","set","from","the","train","set",".","Dev","set","contains","self.cfg.dev_proportion","%","of","samples","with","the","rest","going","into","the","train","set","Test","set","contains","the","whole","dataset","(","Dev","+","Train",")","as","this","dataset","is","small","(","~100",")","and","primarily","used","in","a","zero","shot","setting"]
code: def get_dialog_examples(self, dataset_split: str):
      """
      Process raw files into DialogueInputExample
      Args:
          dataset_split: {train, dev, test}
      For the Mellon QA dataset, there is no explicit dev set (instead uses the test set as the dev set)
      Therefore, this function creates a dev set and a new train set from the train set.
      Dev set contains self.cfg.dev_proportion % of samples with the rest going into the train set
      Test set contains the whole dataset (Dev + Train) as this dataset is small (~100) and primarily used in a zero shot setting
      """
  
      examples = []
  
      raw_examples = self.open_csv("mellon_qa_data.csv")
      raw_examples = list(raw_examples.values())
      # filter out answers with no answer
      raw_examples = [
          example
          for example in raw_examples
          if isinstance(
              example["Non Generative Question Answering "], str
          )
          and isinstance(example["Generative Question Answering "], str)
      ]
  
      n_samples = len(raw_examples)
      idxs = DialogueDataProcessor.get_relevant_idxs(
          dataset_split, n_samples, self.cfg.dev_proportion
      )
  
      for i in idxs:
          utterance = str(raw_examples[i]["Question"])
          answer = str(
              raw_examples[i]["Non Generative Question Answering "]
          )
          well_formed_answer = str(
              raw_examples[i]["Generative Question Answering "]
          )
          passage = raw_examples[i]["Passage"]
          input_example = {
              "utterance": utterance,
              "example_id": i,
              "labels": {
                  "response": answer,
                  "fluent_response": well_formed_answer,
                  "passage": passage,
              },
          }
          example = DialogueInputExample(input_example)
          examples.append(example)
      return examples
  
file_path: NeMo/nemo/collections/nlp/data/dialogue/data_processor/mellon_qa_data_processor.py
imports: import os
  import pandas
  from nemo.collections.nlp.data.dialogue.data_processor.data_processor import DialogueDataProcessor
  from nemo.collections.nlp.data.dialogue.input_example.input_example import DialogueInputExample
label_desc: Use image node_id 3 for calling the DialogueMellonQADataProcessor obj's underlying member method code with example usage: obj.get_dialog_examples(dataset_split) and returns: examples