class_docstr: Store diffs for two experiments.
class_docstr_tok: ["Store","diffs","for","two","experiments","."]
code: def to_string(self):
      ret = []
      spacing_str = "{:<20} {:<33} {:<13} {:<13} {:<13} {:<5}"
      ret.append(
          spacing_str.format(
              "Output Feature Name",
              "Metric Name",
              self.base_experiment_name,
              self.experimental_experiment_name,
              "Diff",
              "Diff Percentage",
          )
      )
      for metric in sorted(self.metrics, key=lambda m: m.name):
          output_feature_name = self.base_summary.output_feature_name
          metric_name = metric.name
          experiment1_val = round(metric.base_value, 3)
          experiment2_val = round(metric.experimental_value, 3)
          diff = round(metric.diff, 3)
          diff_percentage = metric.diff_percentage
          if isinstance(diff_percentage, float):
              diff_percentage = round(metric.diff_percentage, 3)
          ret.append(
              spacing_str.format(
                  output_feature_name,
                  metric_name,
                  experiment1_val,
                  experiment2_val,
                  diff,
                  diff_percentage,
              )
          )
      return "\n".join(ret)
  
imports: import csv
  import logging
  import os
  from dataclasses import dataclass
  from statistics import mean
  from typing import Dict, List, Optional, Set, Union
  import ludwig.modules.metric_modules
  from ludwig.benchmarking.utils import format_memory, format_time
  from ludwig.globals import MODEL_HYPERPARAMETERS_FILE_NAME
  from ludwig.modules.metric_registry import get_metric_classes, metric_feature_type_registry
  from ludwig.types import ModelConfigDict
  from ludwig.utils.data_utils import load_json
label_desc: Use image node_id 1 for calling the MetricsDiff obj's underlying member method code with example usage: obj.to_string() and returns: str