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: This method is updated from `TorchModelBridge._predict(...) in that it
  will accept observation features with or without map_keys. If observation
  features do not contain map_keys, it will insert them based on
  `target_map_values`.
docstr_tok: ["This","method","is","updated","from","`","TorchModelBridge._predict","(","...",")","in","that","it","will","accept","observation","features","with","or","without","map_keys",".","If","observation","features","do","not","contain","map_keys",",","it","will","insert","them","based","on","`","target_map_values","`","."]
code: def _predict(
      self, observation_features: List[ObservationFeatures]
  ) -> List[ObservationData]:
      """This method is updated from `TorchModelBridge._predict(...) in that it
      will accept observation features with or without map_keys. If observation
      features do not contain map_keys, it will insert them based on
      `target_map_values`.
      """
      if not self.model:
          raise ValueError(
              FIT_MODEL_ERROR.format(action="_model_predict")
          )
      # The fitted model expects map_keys. If they do not exist, we use the
      # target values.
      target_map_values = self._default_model_gen_options.get(
          "target_map_values", DEFAULT_TARGET_MAP_VALUES
      )
      for p in self._map_key_features:
          for obsf in observation_features:
              if p not in obsf.parameters:
                  obsf.parameters[p] = target_map_values[
                      p
                  ]  # pyre-ignore[16]
  
      # Convert observation features to array
      X = observation_features_to_array(
          self.parameters_with_map_keys, observation_features
      )
      f, cov = not_none(self.model).predict(X=self._array_to_tensor(X))
      f = f.detach().cpu().clone().numpy()
      cov = cov.detach().cpu().clone().numpy()
      # Convert resulting arrays to observations
      return array_to_observation_data(
          f=f, cov=cov, outcomes=self.outcomes
      )
  
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 3 for calling the MapTorchModelBridge obj's underlying member method code with example usage: obj._predict(observation_features) and returns: array_to_observation_data