class_docstr: Convert a RangeParameter of type int to type float.
  
  Uses either randomized_rounding or default python rounding,
  depending on 'rounding' flag.
  
  The `min_choices` config can be used to transform only the parameters
  with cardinality greater than or equal to `min_choices`; with the exception
  of `log_scale` parameters, which are always transformed.
  
  Transform is done in-place.
class_docstr_tok: ["Convert","a","RangeParameter","of","type","int","to","type","float",".","Uses","either","randomized_rounding","or","default","python","rounding",",","depending","on","'rounding","'","flag",".","The","`","min_choices","`","config","can","be","used","to","transform","only","the","parameters","with","cardinality","greater","than","or","equal","to","`","min_choices","`",";","with","the","exception","of","`","log_scale","`","parameters",",","which","are","always","transformed",".","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:
      self.search_space: SearchSpace = not_none(
          search_space, "IntToFloat requires search space"
      )
      config = config or {}
      self.rounding: str = checked_cast(
          str, config.get("rounding", "strict")
      )
      self.max_round_attempts: int = checked_cast(
          int,
          config.get("max_round_attempts", DEFAULT_MAX_ROUND_ATTEMPTS),
      )
      self.min_choices: int = checked_cast(
          int, config.get("min_choices", 0)
      )
  
      # Identify parameters that should be transformed
      self.transform_parameters: Set[str] = {
          p_name
          for p_name, p in self.search_space.parameters.items()
          if isinstance(p, RangeParameter)
          and p.parameter_type == ParameterType.INT
          and (p.upper - p.lower + 1 >= self.min_choices or p.log_scale)
      }
      if contains_constrained_integer(
          self.search_space, self.transform_parameters
      ):
          self.rounding = "randomized"
          self.contains_constrained_integer: bool = True
      else:
          self.contains_constrained_integer: bool = False
  
file_path: Ax/ax/modelbridge/transforms/int_to_float.py
imports: from logging import Logger
  from typing import Dict, List, Optional, Set, TYPE_CHECKING
  from ax.core.observation import Observation, ObservationFeatures
  from ax.core.parameter import Parameter, ParameterType, RangeParameter
  from ax.core.search_space import SearchSpace
  from ax.modelbridge.transforms.base import Transform
  from ax.modelbridge.transforms.rounding import contains_constrained_integer, randomized_round_parameters
  from ax.modelbridge.transforms.utils import construct_new_search_space
  from ax.models.types import TConfig
  from ax.utils.common.logger import get_logger
  from ax.utils.common.typeutils import checked_cast, not_none
label_desc: Use image node_id 1 to create a new IntToFloat object from inherited base classes: Transform with example: obj = IntToFloat(search_space, observations, modelbridge, config)