class_docstr: A model bridge for using models based on discrete parameters.
  
  Requires that all parameters have been transformed to ChoiceParameters.
class_docstr_tok: ["A","model","bridge","for","using","models","based","on","discrete","parameters",".","Requires","that","all","parameters","have","been","transformed","to","ChoiceParameters","."]
docstr: Validate inputs to `ModelBridge.gen`.
  
  Currently, this is only used to ensure that `n` is a positive integer or -1.
docstr_tok: ["Validate","inputs","to","`","ModelBridge.gen","`",".","Currently",",","this","is","only","used","to","ensure","that","`","n","`","is","a","positive","integer","or","-1","."]
code: def _validate_gen_inputs(
      self,
      n: int,
      search_space: Optional[SearchSpace] = None,
      optimization_config: Optional[OptimizationConfig] = None,
      pending_observations: Optional[
          Dict[str, List[ObservationFeatures]]
      ] = None,
      fixed_features: Optional[ObservationFeatures] = None,
      model_gen_options: Optional[TConfig] = None,
  ) -> None:
      """Validate inputs to `ModelBridge.gen`.
  
      Currently, this is only used to ensure that `n` is a positive integer or -1.
      """
      if n < 1 and n != -1:
          raise UserInputError(
              f"Attempted to generate n={n} points. Number of points to generate "
              "must be either a positive integer or -1."
          )
  
imports: from typing import Dict, List, Optional, Set, Tuple
  from ax.core.observation import Observation, ObservationData, ObservationFeatures, separate_observations
  from ax.core.optimization_config import OptimizationConfig
  from ax.core.parameter import ChoiceParameter, FixedParameter
  from ax.core.search_space import SearchSpace
  from ax.core.types import TParamValueList
  from ax.exceptions.core import UserInputError
  from ax.modelbridge.base import GenResults, ModelBridge
  from ax.modelbridge.modelbridge_utils import array_to_observation_data, get_fixed_features
  from ax.modelbridge.torch import extract_objective_weights, extract_outcome_constraints, validate_optimization_config
  from ax.models.discrete_base import DiscreteModel
  from ax.models.types import TConfig
label_desc: Use image node_id 3 for calling the DiscreteModelBridge obj's underlying member method code with example usage: obj._validate_gen_inputs(n, search_space, optimization_config, pending_observations, fixed_features, model_gen_options) without return types