class_docstr: Convert a RangeParameter of type int to a ordered ChoiceParameter.
  
  Transform is done in-place.
class_docstr_tok: ["Convert","a","RangeParameter","of","type","int","to","a","ordered","ChoiceParameter",".","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
      ), "IntRangeToChoice requires search space"
      config = config or {}
      self.max_choices: float = config.get(
          "max_choices", float("inf")
      )  # pyre-ignore
      # Identify parameters that should be transformed
      self.transform_parameters: Set[str] = {
          p_name
          for p_name, p in search_space.parameters.items()
          if isinstance(p, RangeParameter)
          and p.parameter_type == ParameterType.INT
          and p.upper - p.lower + 1 <= self.max_choices
      }
  
file_path: Ax/ax/modelbridge/transforms/int_range_to_choice.py
imports: from typing import Dict, List, Optional, Set, TYPE_CHECKING
  from ax.core.observation import Observation
  from ax.core.parameter import ChoiceParameter, Parameter, ParameterType, RangeParameter
  from ax.core.search_space import SearchSpace
  from ax.modelbridge.transforms.base import Transform
  from ax.modelbridge.transforms.utils import construct_new_search_space
  from ax.models.types import TConfig
label_desc: Use image node_id 1 to create a new IntRangeToChoice object from inherited base classes: Transform with example: obj = IntRangeToChoice(search_space, observations, modelbridge, config)