class_docstr: A model bridge for using purely random 'models'.
  Data and optimization configs are not required.
  
  This model bridge interfaces with RandomModel.
  
  Attributes:
      model: A RandomModel used to generate candidates
          (note: this an awkward use of the word 'model').
      parameters: Params found in search space on modelbridge init.
class_docstr_tok: ["A","model","bridge","for","using","purely","random","'models","'",".","Data","and","optimization","configs","are","not","required",".","This","model","bridge","interfaces","with","RandomModel",".","Attributes",":","model",":","A","RandomModel","used","to","generate","candidates","(","note",":","this","an","awkward","use","of","the","word","'model","'",")",".","parameters",":","Params","found","in","search","space","on","modelbridge","init","."]
docstr: Generate new candidates according to a search_space.
docstr_tok: ["Generate","new","candidates","according","to","a","search_space","."]
code: def _gen(
      self,
      n: int,
      search_space: SearchSpace,
      pending_observations: Dict[str, List[ObservationFeatures]],
      fixed_features: Optional[ObservationFeatures],
      optimization_config: Optional[OptimizationConfig],
      model_gen_options: Optional[TConfig],
  ) -> GenResults:
      """Generate new candidates according to a search_space."""
      # Extract parameter values
      search_space_digest = extract_search_space_digest(
          search_space, self.parameters
      )
      # Get fixed features
      fixed_features_dict = get_fixed_features(
          fixed_features, self.parameters
      )
      # Extract param constraints
      linear_constraints = extract_parameter_constraints(
          search_space.parameter_constraints, self.parameters
      )
      # Generate the candidates
      X, w = self.model.gen(
          n=n,
          bounds=search_space_digest.bounds,
          linear_constraints=linear_constraints,
          fixed_features=fixed_features_dict,
          model_gen_options=model_gen_options,
          rounding_func=transform_callback(
              self.parameters, self.transforms
          ),
      )
      observation_features = parse_observation_features(
          X, self.parameters
      )
      return GenResults(
          observation_features=observation_features,
          weights=w.tolist(),
      )
  
file_path: Ax/ax/modelbridge/random.py
imports: from typing import Dict, List, Optional
  from ax.core.experiment import Experiment
  from ax.core.observation import Observation, ObservationData, ObservationFeatures
  from ax.core.optimization_config import OptimizationConfig
  from ax.core.search_space import SearchSpace
  from ax.modelbridge.base import GenResults, ModelBridge
  from ax.modelbridge.modelbridge_utils import extract_parameter_constraints, extract_search_space_digest, get_fixed_features, parse_observation_features, transform_callback
  from ax.models.random.base import RandomModel
  from ax.models.types import TConfig
label_desc: Use image node_id 2 for calling the RandomModelBridge obj's underlying member method code with example usage: obj._gen(n, search_space, pending_observations, fixed_features, optimization_config, model_gen_options) and returns: GenResults