class_docstr: RAFT: A Real-World Few-Shot Text Classification Benchmark
  https://arxiv.org/abs/2109.14076
  
  Official website for RAFT dataset:
  https://raft.elicit.org/
  
  Dataset summary:
  https://huggingface.co/datasets/ought/raft/blob/main/README.md
  
  Prompts are adapted from:
  https://github.com/oughtinc/raft-baselines/tree/master/example_prompts
  
  Subsets:
  
  - ade_corpus_v2
  - banking_77
  - neurips_impact_statement_risks
  - one_stop_english
  - overruling
  - semiconductor_org_types
  - systematic_review_inclusion
  - tai_safety_research
  - terms_of_service
  - tweet_eval_hate
  - twitter_complaints
  
  Prompt format
  
      Sentence: <sentence>
      Label: <label>
  
  Examples from ADE corpus (adverse drug effect):
  
      Sentence: No regional side effects were noted.
      Label: not ADE-related
code: def get_instances(self) -> List[Instance]:
      fields, _ = self.load_prompt_construction_settings()
      cache_dir = str(Path(self.output_path) / "data")
      # Download raw data
      # Note: Only using public labeled instances now. Check if we can get the hidden test set labels.
      all_usable_dataset = datasets.load_dataset(
          "ought/raft", self.subset, cache_dir=cache_dir, split="train"
      )
      assert isinstance(all_usable_dataset, datasets.Dataset)
      dataset = all_usable_dataset.train_test_split(
          test_size=0.8, seed=self.random_seed
      )
      train_dataset, test_dataset = dataset["train"], dataset["test"]
      class_label_to_string = train_dataset.features["Label"].int2str
  
      dataset_splits: Dict[str, datasets.Dataset] = {
          TRAIN_SPLIT: train_dataset,
          TEST_SPLIT: test_dataset,
      }
  
      # Read all instances
      random.seed(self.random_seed)
      instances: List[Instance] = []
      for split, subset in dataset_splits.items():
          for x in subset:
              assert fields is not None, "Field ordering not loaded"
              prompt: str = "\n".join(
                  [f"{field}: {x[field]}" for field in fields]
              )
              instance = Instance(
                  input=Input(text=prompt),
                  references=[
                      Reference(
                          Output(
                              text=class_label_to_string(x["Label"])
                          ),
                          tags=[CORRECT_TAG],
                      )
                  ],
                  split=split,
              )
              instances.append(instance)
  
      return instances
  
file_path: H2O/h2o_hf/helm/src/helm/benchmark/scenarios/raft_scenario.py
imports: import random
  import os
  import json
  import tempfile
  import datasets
  from pathlib import Path
  from typing import List, Dict
  from helm.common.general import ensure_file_downloaded, ensure_directory_exists
  from .scenario import Scenario, Instance, Reference, CORRECT_TAG, TRAIN_SPLIT, TEST_SPLIT, Input, Output
label_desc: Use image node_id 3 for calling the RAFTScenario obj's underlying member method code with example usage: obj.get_instances() and returns: instances