class_docstr: Replaces the search space with a single choice parameter, whose values
  are the signatures of the arms observed in the data.
  
  This transform is meant to be used with ThompsonSampler.
  
  Choice parameter will be unordered unless config["use_ordered"] specifies
  otherwise.
  
  Transform is done in-place.
class_docstr_tok: ["Replaces","the","search","space","with","a","single","choice","parameter",",","whose","values","are","the","signatures","of","the","arms","observed","in","the","data",".","This","transform","is","meant","to","be","used","with","ThompsonSampler",".","Choice","parameter","will","be","unordered","unless","config","[","``","use_ordered","''","]","specifies","otherwise",".","Transform","is","done","in-place","."]
code: def __init__(
      self,
      search_space: Optional[SearchSpace] = None,
      observations: Optional[List[Observation]] = None,
      modelbridge: Optional[
          "modelbridge_module.base.ModelBridge"
      ] = None,
      config: Optional[TConfig] = None,
  ) -> None:
      assert (
          search_space is not None
      ), "SearchSpaceToChoice requires search space"
      assert (
          observations is not None
      ), "SeachSpaceToChoice requires observations"
      super().__init__(
          search_space=search_space,
          observations=observations,
          config=config,
      )
      if any(p.is_fidelity for p in search_space.parameters.values()):
          raise ValueError(
              "Cannot perform SearchSpaceToChoice conversion if fidelity "
              "parameters are present"
          )
      if isinstance(search_space, RobustSearchSpace):
          raise UnsupportedError(
              "SearchSpaceToChoice transform is not supported for RobustSearchSpace."
          )
      self.parameter_name = "arms"
      # pyre-fixme[4]: Attribute must be annotated.
      self.signature_to_parameterization = {
          Arm(
              parameters=obs.features.parameters
          ).signature: obs.features.parameters
          for obs in observations
      }
  
file_path: Ax/ax/modelbridge/transforms/search_space_to_choice.py
imports: from typing import List, Optional, TYPE_CHECKING
  from ax.core.arm import Arm
  from ax.core.observation import Observation, ObservationFeatures
  from ax.core.parameter import ChoiceParameter, FixedParameter, ParameterType
  from ax.core.search_space import RobustSearchSpace, SearchSpace
  from ax.exceptions.core import UnsupportedError
  from ax.modelbridge.transforms.base import Transform
  from ax.models.types import TConfig
  from ax.utils.common.typeutils import checked_cast
label_desc: Use image node_id 1 to create a new SearchSpaceToChoice object from inherited base classes: Transform with example: obj = SearchSpaceToChoice(search_space, observations, modelbridge, config)