class_docstr: This is a lightweight stateless class that bundles together instantiation utils.
  It is used both on its own and as a mixin to AxClient, with the intent that
  these methods can be overridden by its subclasses for specific use cases.
class_docstr_tok: ["This","is","a","lightweight","stateless","class","that","bundles","together","instantiation","utils",".","It","is","used","both","on","its","own","and","as","a","mixin","to","AxClient",",","with","the","intent","that","these","methods","can","be","overridden","by","its","subclasses","for","specific","use","cases","."]
docstr: Instantiation wrapper that allows for Ax `Experiment` creation
  without importing or instantiating any Ax classes.
  
  Args:
      parameters: List of dictionaries representing parameters in the
          experiment search space.
          Required elements in the dictionaries are:
          1. "name" (name of parameter, string),
          2. "type" (type of parameter: "range", "fixed", or "choice", string),
          and one of the following:
          3a. "bounds" for range parameters (list of two values, lower bound
          first),
          3b. "values" for choice parameters (list of values), or
          3c. "value" for fixed parameters (single value).
          Optional elements are:
          1. "log_scale" (for float-valued range parameters, bool),
          2. "value_type" (to specify type that values of this parameter should
          take; expects "float", "int", "bool" or "str"),
          3. "is_fidelity" (bool) and "target_value" (float) for fidelity
          parameters,
          4. "is_ordered" (bool) for choice parameters,
          5. "is_task" (bool) for task parameters, and
          6. "digits" (int) for float-valued range parameters.
      name: Name of the experiment to be created.
      parameter_constraints: List of string representation of parameter
          constraints, such as "x3 >= x4" or "-x3 + 2*x4 - 3.5*x5 >= 2". For
          the latter constraints, any number of arguments is accepted, and
          acceptable operators are "<=" and ">=".
      outcome_constraints: List of string representation of outcome
          constraints of form "metric_name >= bound", like "m1 <= 3."
      status_quo: Parameterization of the current state of the system.
          If set, this will be added to each trial to be evaluated alongside
          test configurations.
      experiment_type: String indicating type of the experiment (e.g. name of
          a product in which it is used), if any.
      tracking_metric_names: Names of additional tracking metrics not used for
          optimization.
      objective_name: Name of the metric used as objective in this experiment,
          if experiment is single-objective optimization.
      minimize: Whether this experiment represents a minimization problem, if
          experiment is a single-objective optimization.
      objectives: Mapping from an objective name to "minimize" or "maximize"
          representing the direction for that objective. Used only for
          multi-objective optimization experiments.
      objective_thresholds: A list of objective threshold constraints for multi-
          objective optimization, in the same string format as
          `outcome_constraints` argument.
      support_intermediate_data: Whether trials may report metrics results for
          incomplete runs.
      immutable_search_space_and_opt_config: Whether it's possible to update the
          search space and optimization config on this experiment after creation.
          Defaults to True. If set to True, we won't store or load copies of the
          search space and optimization config on each generator run, which will
          improve storage performance.
      is_test: Whether this experiment will be a test experiment (useful for
          marking test experiments in storage etc). Defaults to False.
      metric_definitions: A mapping of metric names to extra kwargs to pass
          to that metric
docstr_tok: ["Instantiation","wrapper","that","allows","for","Ax","`","Experiment","`","creation","without","importing","or","instantiating","any","Ax","classes",".","Args",":","parameters",":","List","of","dictionaries","representing","parameters","in","the","experiment","search","space",".","Required","elements","in","the","dictionaries","are",":","1",".","``","name","''","(","name","of","parameter",",","string",")",",","2",".","``","type","''","(","type","of","parameter",":","``","range","''",",","``","fixed","''",",","or","``","choice","''",",","string",")",",","and","one","of","the","following",":","3a",".","``","bounds","''","for","range","parameters","(","list","of","two","values",",","lower","bound","first",")",",","3b",".","``","values","''","for","choice","parameters","(","list","of","values",")",",","or","3c",".","``","value","''","for","fixed","parameters","(","single","value",")",".","Optional","elements","are",":","1",".","``","log_scale","''","(","for","float-valued","range","parameters",",","bool",")",",","2",".","``","value_type","''","(","to","specify","type","that","values","of","this","parameter","should","take",";","expects","``","float","''",",","``","int","''",",","``","bool","''","or","``","str","''",")",",","3",".","``","is_fidelity","''","(","bool",")","and","``","target_value","''","(","float",")","for","fidelity","parameters",",","4",".","``","is_ordered","''","(","bool",")","for","choice","parameters",",","5",".","``","is_task","''","(","bool",")","for","task","parameters",",","and","6",".","``","digits","''","(","int",")","for","float-valued","range","parameters",".","name",":","Name","of","the","experiment","to","be","created",".","parameter_constraints",":","List","of","string","representation","of","parameter","constraints",",","such","as","``","x3",">","=","x4","''","or","``","-x3","+","2","*","x4","-","3.5","*","x5",">","=","2","''",".","For","the","latter","constraints",",","any","number","of","arguments","is","accepted",",","and","acceptable","operators","are","``","<","=","''","and","``",">","=","''",".","outcome_constraints",":","List","of","string","representation","of","outcome","constraints","of","form","``","metric_name",">","=","bound","''",",","like","``","m1","<","=","3",".","''","status_quo",":","Parameterization","of","the","current","state","of","the","system",".","If","set",",","this","will","be","added","to","each","trial","to","be","evaluated","alongside","test","configurations",".","experiment_type",":","String","indicating","type","of","the","experiment","(","e.g",".","name","of","a","product","in","which","it","is","used",")",",","if","any",".","tracking_metric_names",":","Names","of","additional","tracking","metrics","not","used","for","optimization",".","objective_name",":","Name","of","the","metric","used","as","objective","in","this","experiment",",","if","experiment","is","single-objective","optimization",".","minimize",":","Whether","this","experiment","represents","a","minimization","problem",",","if","experiment","is","a","single-objective","optimization",".","objectives",":","Mapping","from","an","objective","name","to","``","minimize","''","or","``","maximize","''","representing","the","direction","for","that","objective",".","Used","only","for","multi-objective","optimization","experiments",".","objective_thresholds",":","A","list","of","objective","threshold","constraints","for","multi-","objective","optimization",",","in","the","same","string","format","as","`","outcome_constraints","`","argument",".","support_intermediate_data",":","Whether","trials","may","report","metrics","results","for","incomplete","runs",".","immutable_search_space_and_opt_config",":","Whether","it","'s","possible","to","update","the","search","space","and","optimization","config","on","this","experiment","after","creation",".","Defaults","to","True",".","If","set","to","True",",","we","wo","n't","store","or","load","copies","of","the","search","space","and","optimization","config","on","each","generator","run",",","which","will","improve","storage","performance",".","is_test",":","Whether","this","experiment","will","be","a","test","experiment","(","useful","for","marking","test","experiments","in","storage","etc",")",".","Defaults","to","False",".","metric_definitions",":","A","mapping","of","metric","names","to","extra","kwargs","to","pass","to","that","metric"]
code: def make_experiment(
      cls,
      parameters: List[TParameterRepresentation],
      name: Optional[str] = None,
      description: Optional[str] = None,
      owners: Optional[List[str]] = None,
      parameter_constraints: Optional[List[str]] = None,
      outcome_constraints: Optional[List[str]] = None,
      status_quo: Optional[TParameterization] = None,
      experiment_type: Optional[str] = None,
      tracking_metric_names: Optional[List[str]] = None,
      metric_definitions: Optional[Dict[str, Dict[str, Any]]] = None,
      # Single-objective optimization arguments:
      objective_name: Optional[str] = None,
      minimize: bool = False,
      # Multi-objective optimization arguments:
      objectives: Optional[Dict[str, str]] = None,
      objective_thresholds: Optional[List[str]] = None,
      support_intermediate_data: bool = False,
      immutable_search_space_and_opt_config: bool = True,
      is_test: bool = False,
  ) -> Experiment:
      """Instantiation wrapper that allows for Ax `Experiment` creation
      without importing or instantiating any Ax classes.
  
      Args:
          parameters: List of dictionaries representing parameters in the
              experiment search space.
              Required elements in the dictionaries are:
              1. "name" (name of parameter, string),
              2. "type" (type of parameter: "range", "fixed", or "choice", string),
              and one of the following:
              3a. "bounds" for range parameters (list of two values, lower bound
              first),
              3b. "values" for choice parameters (list of values), or
              3c. "value" for fixed parameters (single value).
              Optional elements are:
              1. "log_scale" (for float-valued range parameters, bool),
              2. "value_type" (to specify type that values of this parameter should
              take; expects "float", "int", "bool" or "str"),
              3. "is_fidelity" (bool) and "target_value" (float) for fidelity
              parameters,
              4. "is_ordered" (bool) for choice parameters,
              5. "is_task" (bool) for task parameters, and
              6. "digits" (int) for float-valued range parameters.
          name: Name of the experiment to be created.
          parameter_constraints: List of string representation of parameter
              constraints, such as "x3 >= x4" or "-x3 + 2*x4 - 3.5*x5 >= 2". For
              the latter constraints, any number of arguments is accepted, and
              acceptable operators are "<=" and ">=".
          outcome_constraints: List of string representation of outcome
              constraints of form "metric_name >= bound", like "m1 <= 3."
          status_quo: Parameterization of the current state of the system.
              If set, this will be added to each trial to be evaluated alongside
              test configurations.
          experiment_type: String indicating type of the experiment (e.g. name of
              a product in which it is used), if any.
          tracking_metric_names: Names of additional tracking metrics not used for
              optimization.
          objective_name: Name of the metric used as objective in this experiment,
              if experiment is single-objective optimization.
          minimize: Whether this experiment represents a minimization problem, if
              experiment is a single-objective optimization.
          objectives: Mapping from an objective name to "minimize" or "maximize"
              representing the direction for that objective. Used only for
              multi-objective optimization experiments.
          objective_thresholds: A list of objective threshold constraints for multi-
              objective optimization, in the same string format as
              `outcome_constraints` argument.
          support_intermediate_data: Whether trials may report metrics results for
              incomplete runs.
          immutable_search_space_and_opt_config: Whether it's possible to update the
              search space and optimization config on this experiment after creation.
              Defaults to True. If set to True, we won't store or load copies of the
              search space and optimization config on each generator run, which will
              improve storage performance.
          is_test: Whether this experiment will be a test experiment (useful for
              marking test experiments in storage etc). Defaults to False.
          metric_definitions: A mapping of metric names to extra kwargs to pass
              to that metric
      """
      if objective_name is not None and (
          objectives is not None or objective_thresholds is not None
      ):
          raise UnsupportedError(
              "Ambiguous objective definition: for single-objective optimization "
              "`objective_name` and `minimize` arguments expected. For "
              "multi-objective optimization `objectives` and `objective_thresholds` "
              "arguments expected."
          )
  
      status_quo_arm = (
          None if status_quo is None else Arm(parameters=status_quo)
      )
  
      # TODO(jej): Needs to be decided per-metric when supporting heterogenous data.
      if objectives is None:
          optimization_config = (
              cls._make_optimization_config_from_legacy_args(
                  objective_name=objective_name
                  or DEFAULT_OBJECTIVE_NAME,
                  minimize=minimize,
                  support_intermediate_data=support_intermediate_data,
                  outcome_constraints=outcome_constraints,
                  status_quo_arm=status_quo_arm,
              )
          )
      else:
          optimization_config = cls.make_optimization_config(
              objectives=objectives,
              objective_thresholds=objective_thresholds or [],
              outcome_constraints=outcome_constraints or [],
              status_quo_defined=status_quo_arm is not None,
              metric_definitions=metric_definitions,
          )
  
      tracking_metrics = (
          None
          if tracking_metric_names is None
          else [
              cls._make_metric(
                  name=metric_name,
                  metric_definitions=metric_definitions,
              )
              for metric_name in tracking_metric_names
          ]
      )
  
      default_data_type = (
          DataType.MAP_DATA
          if support_intermediate_data
          else DataType.DATA
      )
  
      properties: Dict[str, Any] = {}
  
      if immutable_search_space_and_opt_config:
          properties[
              Keys.IMMUTABLE_SEARCH_SPACE_AND_OPT_CONF
          ] = immutable_search_space_and_opt_config
  
      if owners is not None:
          properties["owners"] = owners
  
      return Experiment(
          name=name,
          description=description,
          search_space=cls.make_search_space(
              parameters, parameter_constraints
          ),
          optimization_config=optimization_config,
          status_quo=status_quo_arm,
          experiment_type=experiment_type,
          tracking_metrics=tracking_metrics,
          default_data_type=default_data_type,
          properties=properties,
          is_test=is_test,
      )
  
imports: import enum
  from dataclasses import dataclass
  from logging import Logger
  from typing import Any, Dict, List, Optional, Sequence, Type, Union
  from ax.core.arm import Arm
  from ax.core.experiment import DataType, DEFAULT_OBJECTIVE_NAME, Experiment
  from ax.core.map_metric import MapMetric
  from ax.core.metric import Metric
  from ax.core.objective import MultiObjective, Objective
  from ax.core.observation import ObservationFeatures
  from ax.core.optimization_config import MultiObjectiveOptimizationConfig, ObjectiveThreshold, OptimizationConfig
  from ax.core.outcome_constraint import OutcomeConstraint
  from ax.core.parameter import ChoiceParameter, FixedParameter, Parameter, PARAMETER_PYTHON_TYPE_MAP, ParameterType, RangeParameter, TParameterType
  from ax.core.parameter_constraint import OrderConstraint, ParameterConstraint
  from ax.core.search_space import HierarchicalSearchSpace, SearchSpace
  from ax.core.types import ComparisonOp, TParameterization, TParamValue
  from ax.exceptions.core import UnsupportedError
  from ax.utils.common.constants import Keys
  from ax.utils.common.logger import get_logger
  from ax.utils.common.typeutils import checked_cast, checked_cast_optional, checked_cast_to_tuple, not_none
label_desc: Use image node_id 20 for calling the InstantiationBase obj's underlying member method code with example usage: obj.make_experiment(cls, parameters, name, description, owners, parameter_constraints, outcome_constraints, status_quo, experiment_type, tracking_metric_names, metric_definitions, objective_name, minimize, objectives, objective_thresholds, support_intermediate_data, immutable_search_space_and_opt_config, is_test) and returns: Experiment