class_docstr: Analyzes the human evaluation data of on summarization datasets
  
  1. loads human evaluation data from CodaLab
  2. averages and report {faithfulness, relevance, coherence} scores
  3. compute paired bootstrap test for all pairwise model comparison
code: def load_humaneval_data(self):
      filename = f"{self.dataset}_{self.shots}shots.csv"
  
      tasks_by_id = defaultdict(list)
  
      download_filename = HUMAN_EVAL_CODALAB_LINK.format(
          file_name=filename
      )
      filename = os.path.join(self.eval_download_path, filename)
      ensure_file_downloaded(
          source_url=download_filename, target_path=filename
      )
      mturk_data = pandas.read_csv(filename)
      for i, row in mturk_data.iterrows():
          tasks_by_id[row.HITId].append(row)
  
      self.faithfulness = defaultdict(list)
      self.faithfulness_full = dict()
      for idx, tasks in tasks_by_id.items():
          scores = []
          for task in tasks:
              # Faithfulness is evaluated as a binary choice
              # False -> not Faithful
              # True -> Faithful
              scores.append(
                  1 if task["Answer.consistency.consistent"] else 0
              )
          self.faithfulness_full[
              (
                  task["Input.model_name"],
                  task["Input.id"],
                  task["Input.output_text"],
              )
          ] = np.mean(scores)
          self.faithfulness[task["Input.model_name"]].append(
              np.mean(scores)
          )
  
      self.coherence = defaultdict(list)
      self.coherence_full = dict()
      for idx, tasks in tasks_by_id.items():
          scores = []
          for task in tasks:
              # Coherence is evaluated on a 1 to 5 Likert scale.
              # 1 -> least coherent
              # 5 -> most coherent
              for i in range(1, 6):
                  if task[f"Answer.coherence.cohere_{i}"]:
                      scores.append(i)
                      break
          self.coherence_full[
              (
                  task["Input.model_name"],
                  task["Input.id"],
                  task["Input.output_text"],
              )
          ] = np.mean(scores)
          self.coherence[task["Input.model_name"]].append(
              np.mean(scores)
          )
  
      self.relevance = defaultdict(list)
      self.relevance_full = dict()
      for idx, tasks in tasks_by_id.items():
          scores = []
          for task in tasks:
              # Relevance is evaluated on a 1 to 5 Likert scale.
              # 1 -> least relevant
              # 5 -> most relevant
              for i in range(1, 6):
                  if task[f"Answer.relevance.rel_{i}"]:
                      scores.append(i)
                      break
          self.relevance_full[
              (
                  task["Input.model_name"],
                  task["Input.id"],
                  task["Input.output_text"],
              )
          ] = np.mean(scores)
          self.relevance[task["Input.model_name"]].append(
              np.mean(scores)
          )
  
imports: import json
  import pandas
  import numpy
  import os
  import pickle
  import spacy
  from typing import List, Dict, Optional
  from collections import defaultdict
  from helm.benchmark.adaptation.scenario_state import ScenarioState
  from helm.benchmark.adaptation.request_state import RequestState
  from helm.benchmark.adaptation.adapter_spec import AdapterSpec
  from helm.common.hierarchical_logger import hlog
  from helm.common.general import ensure_file_downloaded
  from .metric import Metric, MetricResult
  from .metric_name import MetricName
  from .metric_service import MetricService
  from .basic_metrics import get_rouge_function
  from .statistic import Stat
  from .summac.model_summac import SummaCZS
  from bert_score import BERTScorer
label_desc: Use image node_id 2 for calling the SummarizationHumanEvalAnalyzer obj's underlying member method code with example usage: obj.load_humaneval_data() without return types