class_docstr: Abstract class which defines an evaluator config.
class_docstr_tok: ["Abstract","class","which","defines","an","evaluator","config","."]
code: def to_dict(self):
      config_dict = {}
      for key, value in self.__dict__.items():
          k_strip = key.lstrip("_")
          if k_strip in self._timedelta_keys and value is not None:
              config_dict[k_strip] = (
                  value.microseconds / 1e6
                  if isinstance(value, pd.Timedelta)
                  else value.freqstr
              )
          else:
              config_dict[k_strip] = value
      return config_dict
  
imports: from abc import abstractmethod
  from typing import Any, List, Tuple, Union
  import numpy
  import pandas
  from tqdm import tqdm
  from merlion.models.base import ModelBase
  from merlion.models.forecast.base import ForecasterBase
  from merlion.utils.misc import AutodocABCMeta
  from merlion.utils.resample import granularity_str_to_seconds, to_offset
  from merlion.utils.time_series import TimeSeries
label_desc: Use image node_id 9 for calling the EvaluatorConfig obj's underlying member method code with example usage: obj.to_dict() and returns: config_dict