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
docstr: Dumps pair-wise model comparison results (based on paired bootstrap test) into a json file.
  
  Output format:
  {
      "faithfulness":[
          {"model1": ..., "model2": ..., "p value: ...}
      ]
      "relevance": ...,
      "coherence": ...
  }
  
  Args:
      output_file_path: str, path to the output json file
code: def dump_test_result(self, output_file_path: str):
      """
      Dumps pair-wise model comparison results (based on paired bootstrap test) into a json file.
  
      Output format:
      {
          "faithfulness":[
              {"model1": ..., "model2": ..., "p value: ...}
          ]
          "relevance": ...,
          "coherence": ...
      }
  
      Args:
          output_file_path: str, path to the output json file
      """
      assert self.faithfulness
      assert self.coherence
      assert self.relevance
  
      output_pvalues = defaultdict(list)
  
      avg_faithful_scores = self._compute_average(self.faithfulness)
      sorted_models, _ = zip(
          *sorted(avg_faithful_scores, key=lambda x: x[1], reverse=True)
      )
      for i, best_model in enumerate(sorted_models):
          for other_model in sorted_models[i + 1 :]:
              p_value = _paired_bootstrap_test(
                  self.faithfulness[best_model],
                  self.faithfulness[other_model],
              )
              output_pvalues["faithfulness"].append(
                  {
                      "model1": best_model,
                      "model2": other_model,
                      "p value": p_value,
                  }
              )
  
      avg_relevance_scores = self._compute_average(self.relevance)
      sorted_models, _ = zip(
          *sorted(
              avg_relevance_scores, key=lambda x: x[1], reverse=True
          )
      )
      for i, best_model in enumerate(sorted_models):
          for other_model in sorted_models[i + 1 :]:
              p_value = _paired_bootstrap_test(
                  self.relevance[best_model],
                  self.relevance[other_model],
              )
              output_pvalues["relevance"].append(
                  {
                      "model1": best_model,
                      "model2": other_model,
                      "p value": p_value,
                  }
              )
  
      avg_coherence_scores = self._compute_average(self.coherence)
      sorted_models, _ = zip(
          *sorted(
              avg_coherence_scores, key=lambda x: x[1], reverse=True
          )
      )
      for i, best_model in enumerate(sorted_models):
          for other_model in sorted_models[i + 1 :]:
              p_value = _paired_bootstrap_test(
                  self.coherence[best_model],
                  self.coherence[other_model],
              )
              output_pvalues["coherence"].append(
                  {
                      "model1": best_model,
                      "model2": other_model,
                      "p value": p_value,
                  }
              )
  
      with open(output_file_path, "w") as f:
          json.dump(dict(output_pvalues), f)
  
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 5 for calling the SummarizationHumanEvalAnalyzer obj's underlying member method code with example usage: obj.dump_test_result(output_file_path) without return types