code: def plot_summary_of_models(
      results,
      output_directory,
      save_file="SummaryOfModels.html",
      plot_title="Models produced during fit()",
      show_plot=True,
  ):
      """Plot dynamic scatterplot summary of each model encountered during fit(), based on the returned Results object."""
      num_trials = len(results["trial_info"])
      attr_color = None
      attr_size = None
      datadict = {"trial_id": sorted(results["trial_info"].keys())}
      datadict["performance"] = [
          results["trial_info"][trial_id][results["reward_attr"]]
          for trial_id in datadict["trial_id"]
      ]
      datadict["hyperparameters"] = [
          _formatDict(results["trial_info"][trial_id]["config"])
          for trial_id in datadict["trial_id"]
      ]
      hidden_keys = []
      # Determine x-axis attribute:
      if "latency" in results["metadata"]:
          datadict["latency"] = [
              results["trial_info"][trial_id]["metadata"]["latency"]
              for trial_id in datadict["trial_id"]
          ]
          attr_x = "latency"
      else:
          attr_x = list(results["best_config"].keys())[0]
          datadict[attr_x] = [
              results["trial_info"][trial_id]["config"][attr_x]
              for trial_id in datadict["trial_id"]
          ]
          hidden_keys.append(attr_x)
      # Determine size attribute:
      if "memory" in results["metadata"]:
          datadict["memory"] = [
              results["trial_info"][trial_id]["metadata"]["memory"]
              for trial_id in datadict["trial_id"]
          ]
          attr_size = "memory"
  
      # Determine color attribute:
      if "training_loss" in results:
          datadict["training_loss"] = [
              results["trial_info"][trial_id]["training_loss"]
              for trial_id in datadict["trial_id"]
          ]
          attr_color = "training_loss"
  
      save_path = (
          os.path.join(output_directory, save_file)
          if output_directory
          else None
      )
      mousover_plot(
          datadict,
          attr_x=attr_x,
          attr_y="performance",
          attr_color=attr_color,
          attr_size=attr_size,
          save_file=save_path,
          plot_title=plot_title,
          hidden_keys=hidden_keys,
          show_plot=show_plot,
      )
      if save_path is not None:
          print("Plot summary of models saved to file: %s" % save_file)
  
file_path: autogluon/core/src/autogluon/core/utils/plots.py
imports: import os
  import warnings
  from collections import OrderedDict
  import numpy
  from .miscs import warning_filter
label_desc: Use image node_id 2 for calling a global function with example usage: plot_summary_of_models(results, output_directory, save_file, plot_title, show_plot) without return types