class_docstr: A model bridge for using torch-based models that fit on MapData. Most
  of the `TorchModelBridge` functionality is retained, except that this
  class should be used in the case where `model` makes use of map_key values.
  For example, the use case of fitting a joint surrogate model on
  `(parameters, map_key)`, while candidate generation is only for `parameters`.
class_docstr_tok: ["A","model","bridge","for","using","torch-based","models","that","fit","on","MapData",".","Most","of","the","`","TorchModelBridge","`","functionality","is","retained",",","except","that","this","class","should","be","used","in","the","case","where","`","model","`","makes","use","of","map_key","values",".","For","example",",","the","use","case","of","fitting","a","joint","surrogate","model","on","`","(","parameters",",","map_key",")","`",",","while","candidate","generation","is","only","for","`","parameters","`","."]
docstr: The difference b/t this method and
  TorchModelBridge._array_to_observation_features(...) is
  that this one makes use of `self.parameters_with_map_keys`.
docstr_tok: ["The","difference","b\/t","this","method","and","TorchModelBridge._array_to_observation_features","(","...",")","is","that","this","one","makes","use","of","`","self.parameters_with_map_keys","`","."]
code: def _array_to_observation_features(
      self,
      X: np.ndarray,
      candidate_metadata: Optional[List[TCandidateMetadata]],
  ) -> List[ObservationFeatures]:
      """The difference b/t this method and
      TorchModelBridge._array_to_observation_features(...) is
      that this one makes use of `self.parameters_with_map_keys`.
      """
      return parse_observation_features(
          X=X,
          param_names=self.parameters_with_map_keys,
          candidate_metadata=candidate_metadata,
      )
  
imports: from typing import Any, Dict, List, Optional, Tuple, Type
  import numpy
  import torch
  from ax.core.data import Data
  from ax.core.experiment import Experiment
  from ax.core.map_data import MapData
  from ax.core.observation import Observation, ObservationData, ObservationFeatures, observations_from_map_data, separate_observations
  from ax.core.optimization_config import OptimizationConfig
  from ax.core.search_space import SearchSpace
  from ax.core.types import TCandidateMetadata
  from ax.modelbridge.base import GenResults
  from ax.modelbridge.modelbridge_utils import array_to_observation_data, observation_features_to_array, parse_observation_features
  from ax.modelbridge.torch import FIT_MODEL_ERROR, TorchModelBridge
  from ax.modelbridge.transforms.base import Transform
  from ax.models.torch_base import TorchModel
  from ax.models.types import TConfig
  from ax.utils.common.constants import Keys
  from ax.utils.common.typeutils import not_none
label_desc: Use image node_id 6 for calling the MapTorchModelBridge obj's underlying member method code with example usage: obj._array_to_observation_features(X, candidate_metadata) and returns: parse_observation_features