class_docstr: A metric defined by a dictionary mapping parameter values to the
  corresponding metric values.
  
  This provides an option to add normal noise with mean 0 and mean_sd scale
  to the given metric values.
class_docstr_tok: ["A","metric","defined","by","a","dictionary","mapping","parameter","values","to","the","corresponding","metric","values",".","This","provides","an","option","to","add","normal","noise","with","mean","0","and","mean_sd","scale","to","the","given","metric","values","."]
docstr: Metric is computed via a dictionary look up using a tuple of
  parameter values, constructed based on the ordering of parameter
  names given in `param_names`.
  
  Args:
      name: Name of the metric.
      param_names: An ordered list of names of parameters to be used
          to construct the dictionary key.
      lookup_dict: A dictionary mapping a tuple of parameter values to
          the metric values.
      noise_sd: Scale of normal noise added to the function result. If
          None, interpret the function as noisy with unknown noise level.
      lower_is_better: Flag for metrics which should be minimized.
docstr_tok: ["Metric","is","computed","via","a","dictionary","look","up","using","a","tuple","of","parameter","values",",","constructed","based","on","the","ordering","of","parameter","names","given","in","`","param_names","`",".","Args",":","name",":","Name","of","the","metric",".","param_names",":","An","ordered","list","of","names","of","parameters","to","be","used","to","construct","the","dictionary","key",".","lookup_dict",":","A","dictionary","mapping","a","tuple","of","parameter","values","to","the","metric","values",".","noise_sd",":","Scale","of","normal","noise","added","to","the","function","result",".","If","None",",","interpret","the","function","as","noisy","with","unknown","noise","level",".","lower_is_better",":","Flag","for","metrics","which","should","be","minimized","."]
code: def __init__(
      self,
      name: str,
      param_names: List[str],
      lookup_dict: Dict[
          Tuple[Union[str, float, int, bool], ...], float
      ],
      noise_sd: Optional[float] = 0.0,
      lower_is_better: Optional[bool] = None,
  ) -> None:
      """Metric is computed via a dictionary look up using a tuple of
      parameter values, constructed based on the ordering of parameter
      names given in `param_names`.
  
      Args:
          name: Name of the metric.
          param_names: An ordered list of names of parameters to be used
              to construct the dictionary key.
          lookup_dict: A dictionary mapping a tuple of parameter values to
              the metric values.
          noise_sd: Scale of normal noise added to the function result. If
              None, interpret the function as noisy with unknown noise level.
          lower_is_better: Flag for metrics which should be minimized.
      """
      self.param_names = param_names
      self.lookup_dict = lookup_dict
      self.noise_sd = noise_sd
      super().__init__(name=name, lower_is_better=lower_is_better)
  
file_path: Ax/ax/metrics/dict_lookup.py
imports: from __future__ import annotations
  from typing import Any, Dict, List, Optional, Tuple, Union
  import numpy
  import pandas
  from ax.core.base_trial import BaseTrial
  from ax.core.data import Data
  from ax.core.metric import Metric, MetricFetchE, MetricFetchResult
  from ax.utils.common.result import Err, Ok
  from ax.utils.common.typeutils import not_none
label_desc: Use image node_id 1 to create a new DictLookupMetric object from inherited base classes: Metric with example: obj = DictLookupMetric(name, param_names, lookup_dict, noise_sd, lower_is_better)