class_docstr: Unified interface for all CommonSense scenarios.
  
  - The "HellaSwag" benchmark from this paper:
    https://arxiv.org/pdf/1905.07830.pdf
  
  - The "OpenBookQA" benchmark from this paper:
    https://aclanthology.org/D18-1260.pdf
  
  - The "CommonSenseQA" benchmark from this paper:
    https://arxiv.org/pdf/1811.00937.pdf
  
  - The "PIQA" benchmark from this paper:
    https://arxiv.org/pdf/1911.11641.pdf
  
  - The "SIQA" benchmark from this paper:
    https://arxiv.org/pdf/1904.09728.pdf
class_docstr_tok: ["Unified","interface","for","all","CommonSense","scenarios",".","-","The","``","HellaSwag","''","benchmark","from","this","paper",":","https",":","\/\/arxiv.org\/pdf\/1905.07830.pdf","-","The","``","OpenBookQA","''","benchmark","from","this","paper",":","https",":","\/\/aclanthology.org\/D18-1260.pdf","-","The","``","CommonSenseQA","''","benchmark","from","this","paper",":","https",":","\/\/arxiv.org\/pdf\/1811.00937.pdf","-","The","``","PIQA","''","benchmark","from","this","paper",":","https",":","\/\/arxiv.org\/pdf\/1911.11641.pdf","-","The","``","SIQA","''","benchmark","from","this","paper",":","https",":","\/\/arxiv.org\/pdf\/1904.09728.pdf"]
code: def get_instances(self) -> List[Instance]:
      self.download_dataset()
      data = self.load_dataset()
  
      splits = {
          "train": TRAIN_SPLIT,
          "val": VALID_SPLIT,
          "test": TEST_SPLIT,
      }
  
      instances: List[Instance] = []
  
      def answer_to_reference(answer: str) -> Reference:
          return Reference(
              Output(text=answer),
              tags=[CORRECT_TAG] if answer == correct_answer else [],
          )
  
      for question_id, (
          question,
          answers,
          correct_answer,
          split,
      ) in enumerate(data):
          instance = Instance(
              input=Input(text=question),
              references=list(map(answer_to_reference, answers)),
              split=splits[split],
          )
          instances.append(instance)
      return instances
  
file_path: H2O/h2o_hf/helm/src/helm/benchmark/scenarios/commonsense_scenario.py
imports: import json
  import os
  from typing import List
  from helm.common.general import ensure_file_downloaded, ensure_directory_exists
  from helm.common.hierarchical_logger import hlog
  from .scenario import Scenario, Instance, Reference, TRAIN_SPLIT, VALID_SPLIT, TEST_SPLIT, CORRECT_TAG, Input, Output
label_desc: Use image node_id 9 for calling the CommonSenseScenario obj's underlying member method code with example usage: obj.get_instances() and returns: instances, Reference