class_docstr: Analyzer.
  
  Given a run_id, we can do lots of fun things!
class_docstr_tok: ["Analyzer",".","Given","a","run_id",",","we","can","do","lots","of","fun","things","!"]
docstr: Initialize the analyzer.
  
  Builds up the dataframe
  
  :param opt:
      opt dict
  
  :param remove_failed:
      Whether to remove ratings from turkers who failed onboarding
docstr_tok: ["Initialize","the","analyzer",".","Builds","up","the","dataframe",":","param","opt",":","opt","dict",":","param","remove_failed",":","Whether","to","remove","ratings","from","turkers","who","failed","onboarding"]
code: def __init__(self, opt: Dict, remove_failed: bool = True):
      """
      Initialize the analyzer.
  
      Builds up the dataframe
  
      :param opt:
          opt dict
  
      :param remove_failed:
          Whether to remove ratings from turkers who failed onboarding
      """
      assert (
          "," not in opt["run_ids"]
      ), "AcuteAnalyzer can only handle one run ID!"
      self.run_id = opt["run_ids"]
      self.pairings_filepath = opt["pairings_filepath"]
      self.outdir = opt["outdir"]
      self.root_dir = opt["root_dir"]
      # Get task for loading pairing files
      self.task = opt.get("task", "q")
      if opt.get("model_ordering") is not None:
          self.custom_model_ordering = opt["model_ordering"].split(",")
      else:
          self.custom_model_ordering = None
      if not self.outdir or not self.pairings_filepath:
          # Default to using self.root_dir as the root directory for outputs
          assert self.root_dir is not None and os.path.isdir(
              self.root_dir
          ), "--root-dir must be a real directory!"
      if not self.pairings_filepath:
          # Will be set to a non-empty path later
          self.pairings_filepath = ""
      if not self.outdir:
          self.outdir = os.path.join(
              self.root_dir, f"{self.run_id}-results"
          )
      if not os.path.exists(self.outdir):
          os.makedirs(self.outdir, exist_ok=True)
      mephisto_root_path = opt["mephisto_root"]
      if not mephisto_root_path:
          mephisto_root_path = None
      self.mephisto_db = LocalMephistoDB(
          database_path=mephisto_root_path
      )
      self.mephisto_data_browser = MephistoDataBrowser(
          db=self.mephisto_db
      )
      self.checkbox_prefix = self.CHECKBOX_PREFIX
      # Prepended to checkbox columns in self.dataframe
      self.dataframe = self._extract_to_dataframe()
      self._check_eval_question()
      if remove_failed:
          self._remove_failed_onboarding()
      if self.dataframe.index.size == 0:
          raise ValueError("No valid results found!")
      self._get_model_nick_names()
      self._load_pairing_files()
  
imports: import hashlib
  import json
  import os
  from copy import deepcopy
  from datetime import datetime
  from typing import Dict, Any, List, Optional
  import numpy
  import pandas
  from IPython.core.display import HTML
  from mephisto.tools.data_browser import DataBrowser
  from mephisto.abstractions.databases.local_database import LocalMephistoDB
  from mephisto.data_model.unit import Unit
  from mephisto.data_model.worker import Worker
  from scipy.stats import binom_test
  from parlai.core.params import ParlaiParser
  from parlai.crowdsourcing.tasks.acute_eval.acute_eval_blueprint import BLUEPRINT_TYPE
  from parlai.crowdsourcing.tasks.acute_eval.fast_acute_blueprint import FAST_ACUTE_BLUEPRINT_TYPE
  from parlai.crowdsourcing.tasks.acute_eval.util import get_hashed_combo_path
label_desc: Use image node_id 1 to create a new AcuteAnalyzer object from inherited base classes: object with example: obj = AcuteAnalyzer(opt, remove_failed)