class_docstr: What metrics to evaluate
class_docstr_tok: ["What","metrics","to","evaluate"]
code: def from_dict(obj: Any) -> "EvaluationMetricParam":
      assert isinstance(obj, dict)
      agg_func = from_union(
          [lambda x: from_dict(lambda x: x, x), from_none],
          obj.get("agg_func"),
      )
      agg_periods = from_union(
          [from_int, from_none], obj.get("agg_periods")
      )
      cv_report_metrics = from_union(
          [from_str, from_list_str, from_none],
          obj.get("cv_report_metrics"),
      )
      cv_selection_metric = from_union(
          [from_str, from_none], obj.get("cv_selection_metric")
      )
      null_model_params = from_union(
          [lambda x: from_dict(lambda x: x, x), from_none],
          obj.get("null_model_params"),
      )
      relative_error_tolerance = from_union(
          [from_float, from_none], obj.get("relative_error_tolerance")
      )
      return EvaluationMetricParam(
          agg_func=agg_func,
          agg_periods=agg_periods,
          cv_report_metrics=cv_report_metrics,
          cv_selection_metric=cv_selection_metric,
          null_model_params=null_model_params,
          relative_error_tolerance=relative_error_tolerance,
      )
  
imports: import json
  from dataclasses import dataclass
  from typing import Any
  from typing import Callable
  from typing import Dict
  from typing import List
  from typing import Optional
  from typing import Type
  from typing import TypeVar
  from typing import Union
  from typing import cast
  from greykite.common.python_utils import assert_equal
label_desc: Use image node_id 1 for calling the EvaluationMetricParam obj's underlying member method code with example usage: obj.from_dict(obj) and returns: EvaluationMetricParam