class_docstr: Abstract parent class for HuggingFace teachers. Extend this class and specify the
  attributes below to use a different dataset.
  
  hf_path = path parameter passed into hugging face load_dataset function
  hf_name = name parameter passed into hugging face load_dataset function
  hf_text_fields = list of names of the data fields from the dataset to be included in the text/query
  hf_message_fields = [optional] list of names of the data fields from the dataset to be included in the message object but *not* text
  hf_label_field = name of the data field from the hf dataset that specifies the label of the episode
  hf_splits_mapping = dictionary mapping with the keys 'train', 'valid', and 'test', that map to the
  names of the splits of the hf dataset.
  render_text_field = bool where if True, will include the text field name in the query (e.g. "sentence: <sentence>")
class_docstr_tok: ["Abstract","parent","class","for","HuggingFace","teachers",".","Extend","this","class","and","specify","the","attributes","below","to","use","a","different","dataset",".","hf_path","=","path","parameter","passed","into","hugging","face","load_dataset","function","hf_name","=","name","parameter","passed","into","hugging","face","load_dataset","function","hf_text_fields","=","list","of","names","of","the","data","fields","from","the","dataset","to","be","included","in","the","text\/query","hf_message_fields","=","[","optional","]","list","of","names","of","the","data","fields","from","the","dataset","to","be","included","in","the","message","object","but","*","not","*","text","hf_label_field","=","name","of","the","data","field","from","the","hf","dataset","that","specifies","the","label","of","the","episode","hf_splits_mapping","=","dictionary","mapping","with","the","keys","'train","'",",","'valid","'",",","and","'test","'",",","that","map","to","the","names","of","the","splits","of","the","hf","dataset",".","render_text_field","=","bool","where","if","True",",","will","include","the","text","field","name","in","the","query","(","e.g",".","``","sentence",":","<","sentence",">","''",")"]
docstr: Default implementation of setup_data.
  
  Manually override if needed.
docstr_tok: ["Default","implementation","of","setup_data",".","Manually","override","if","needed","."]
code: def setup_data(self, path: str) -> Iterable[tuple]:
      """
      Default implementation of setup_data.
  
      Manually override if needed.
      """
      # load dataset from HuggingFace
      self.dataset = datasets.load_dataset(
          path=self.hf_path, name=self.hf_name, split=self.hf_split
      )
  
      for row in self.dataset:
          query, text_dict = self._get_text_value(row)
          label = self._get_label_value(row)
          label, candidates = self._get_label_candidates(row, label)
  
          episode_dict = text_dict
          episode_dict["text"] = query
          episode_dict["label"] = label
          episode_dict["label_candidates"] = candidates
          yield episode_dict, True
  
file_path: ParlAI/parlai/tasks/huggingface/agents.py
imports: from parlai.core.build_data import make_dir
  from parlai.core.teachers import DialogTeacher
  from parlai.utils.data import DatatypeHelper
  from typing import Dict, Iterable, List, Optional, Tuple
  from typing_extensions import TypedDict
  import os
  import datasets
label_desc: Use image node_id 6 for calling the AbstractHuggingFaceTeacher obj's underlying member method code with example usage: obj.setup_data(path) without return types