class_docstr: Main class producing plots. Each create_*() method reads group data from base_path and creates a plot at the
  save_path. create_all_plots() runs all these functions at once.
class_docstr_tok: ["Main","class","producing","plots",".","Each","create_","*","(",")","method","reads","group","data","from","base_path","and","creates","a","plot","at","the","save_path",".","create_all_plots","(",")","runs","all","these","functions","at","once","."]
docstr: Create accuracy-vs-property plots for: release date, #parameters, thePile perplexity.
  In all cases, we use a coarse value for the property to make the plot text annotations cleaner.
docstr_tok: ["Create","accuracy-vs-property","plots","for",":","release","date",",","#","parameters",",","thePile","perplexity",".","In","all","cases",",","we","use","a","coarse","value","for","the","property","to","make","the","plot","text","annotations","cleaner","."]
code: def create_all_accuracy_v_model_property_plots(self):
      """
      Create accuracy-vs-property plots for: release date, #parameters, thePile perplexity.
      In all cases, we use a coarse value for the property to make the plot text annotations cleaner.
      """
  
      def get_model_release_date(model_name: str) -> Optional[date]:
          """Maps a model name to the month of model release."""
          release_date = self.model_metadata[model_name].release_date
          if release_date is None:
              return None
          return release_date.replace(day=1)
  
      def get_model_size(model_name: str) -> Optional[int]:
          """Maps a model name to the number of parameters, rounding to the nearest leading digit."""
          size = self.model_metadata[model_name].num_parameters
          if size is None:
              return None
          grain = 10 ** (len(str(size)) - 1)
          return round(size / grain) * grain  # only look at first digit
  
      # Read the perplexity of The Pile according to each model
      bpb_table = self.get_group_tables("the_pile")["The Pile"]
      model_to_bpb: Dict[str, float] = {
          model: bpb
          for model, bpb in zip(
              bpb_table.adapters, bpb_table.columns[0].values
          )
      }
  
      def get_model_perplexity(model_name: str) -> Optional[float]:
          """Maps a model name to the perplexity of The Pile of parameters, rounding based on some granularity."""
          if model_name not in model_to_bpb or np.isnan(
              model_to_bpb[model_name]
          ):
              return None
          bpb = model_to_bpb[model_name]
          grain = 0.016
          return round(bpb / grain) * grain
  
      annotate_models = True if self.plot_format == "pdf" else False
      self.create_accuracy_v_model_property_plot(
          "Release date",
          get_model_release_date,
          cumulative=True,
          annotate_models=annotate_models,
      )
      self.create_accuracy_v_model_property_plot(
          "Num parameters",
          get_model_size,
          cumulative=True,
          logscale=True,
          annotate_models=annotate_models,
      )
      self.create_accuracy_v_model_property_plot(
          "The Pile perplexity",
          get_model_perplexity,
          logscale=True,
          annotate_models=annotate_models,
      )
  
imports: import argparse
  from collections import defaultdict
  from dataclasses import dataclass
  from datetime import date
  import json
  import os
  from typing import List, Dict, Optional, Any, Callable, Union, Mapping, Tuple, Set
  import colorcet
  import matplotlib
  import matplotlib.pyplot
  import numpy
  from scipy.stats import pearsonr
  import seaborn
  from helm.common.hierarchical_logger import hlog
  from helm.benchmark.presentation.schema import read_schema
  from helm.benchmark.presentation.summarize import AGGREGATE_WIN_RATE_COLUMN
label_desc: Use image node_id 8 for calling the Plotter obj's underlying member method code with example usage: obj.create_all_accuracy_v_model_property_plots() and returns: release_date, unknown, unknown, None, None, None