docstr: A dataset class that feed data for P-tuning model
  Args:
      input_file: loose json data file. The format is {"sentence":"input sentence", "label":"class label"}
      queries: list of query input sentences
      prompt: the prompt string appended at the end of your input sentence
docstr_tok: ["A","dataset","class","that","feed","data","for","P-tuning","model","Args",":","input_file",":","loose","json","data","file",".","The","format","is","{","``","sentence","''",":","''","input","sentence","''",",","``","label","''",":","''","class","label","''","}","queries",":","list","of","query","input","sentences","prompt",":","the","prompt","string","appended","at","the","end","of","your","input","sentence"]
code: def __init__(
      self,
      input_file: str,
      queries: List[str] = None,
      prompt: str = "Sentiment",
  ):
      """
      A dataset class that feed data for P-tuning model
      Args:
          input_file: loose json data file. The format is {"sentence":"input sentence", "label":"class label"}
          queries: list of query input sentences
          prompt: the prompt string appended at the end of your input sentence
      """
      super().__init__()
      if input_file and not os.path.exists(input_file):
          raise FileNotFoundError(
              f"Data file `{input_file}` not found! Each line of the data file should contain json object"
              f"where `sentence` key maps to sentence and `label` key maps to label"
          )
      if queries is None:
          json_data = load_file(input_file)
      else:
          json_data = []
          for line in queries:
              json_data.append(
                  {"sentence": line + f" {prompt} ", "label": ""}
              )
      self.data = json_data
  
file_path: NeMo/nemo/collections/nlp/data/text_classification/ptune_text_classification_dataset.py
imports: import json
  import os
  from typing import Dict, List, Optional
  from nemo.core.classes import Dataset
  from nemo.core.neural_types import NeuralType, StringLabel, StringType
label_desc: Use image node_id 2 to create a new PTuneTextClassificationDataset object from inherited base classes: Dataset with example: obj = PTuneTextClassificationDataset(input_file, queries, prompt)