class_docstr: Testing the instantiation utilities functionality that is not tested in
  main `AxClient` testing suite (`TestServiceAPI`).
class_docstr_tok: ["Testing","the","instantiation","utilities","functionality","that","is","not","tested","in","main","`","AxClient","`","testing","suite","(","`","TestServiceAPI","`",")","."]
code: def test_make_optimization_config(self) -> None:
      objectives = {"branin": "minimize", "currin": "maximize"}
      objective_thresholds = ["branin <= 0", "currin >= 0"]
      with self.subTest(
          "Single-objective optimizations with objective thresholds"
      ):
          with self.assertRaisesRegex(
              ValueError, "not specify objective thresholds"
          ):
              InstantiationBase.make_optimization_config(
                  {"branin": "minimize"},
                  objective_thresholds,
                  outcome_constraints=[],
                  status_quo_defined=False,
              )
  
      with self.subTest("MOO with partial objective thresholds"):
          multi_optimization_config = (
              InstantiationBase.make_optimization_config(
                  objectives,
                  objective_thresholds=objective_thresholds[:1],
                  outcome_constraints=[],
                  status_quo_defined=False,
              )
          )
          self.assertEqual(
              len(multi_optimization_config.objective.metrics), 2
          )
          self.assertEqual(
              len(
                  checked_cast(
                      MultiObjectiveOptimizationConfig,
                      multi_optimization_config,
                  ).objective_thresholds
              ),
              1,
          )
  
      with self.subTest("MOO with all objective threshold"):
          multi_optimization_config = (
              InstantiationBase.make_optimization_config(
                  objectives,
                  objective_thresholds,
                  outcome_constraints=[],
                  status_quo_defined=False,
              )
          )
          self.assertEqual(
              len(multi_optimization_config.objective.metrics), 2
          )
          self.assertEqual(
              len(
                  checked_cast(
                      MultiObjectiveOptimizationConfig,
                      multi_optimization_config,
                  ).objective_thresholds
              ),
              2,
          )
  
      with self.subTest(
          "Single-objective optimizations without objective thresholds"
      ):
          single_optimization_config = (
              InstantiationBase.make_optimization_config(
                  {"branin": "minimize"},
                  objective_thresholds=[],
                  outcome_constraints=[],
                  status_quo_defined=False,
              )
          )
          self.assertEqual(
              single_optimization_config.objective.metric.name, "branin"
          )
  
file_path: Ax/ax/service/tests/test_instantiation_utils.py
imports: from typing import Any, Dict
  from ax.core.metric import Metric
  from ax.core.optimization_config import MultiObjectiveOptimizationConfig
  from ax.core.parameter import FixedParameter, ParameterType, RangeParameter
  from ax.core.search_space import HierarchicalSearchSpace
  from ax.exceptions.core import UnsupportedError
  from ax.service.utils.instantiation import InstantiationBase
  from ax.utils.common.testutils import TestCase
  from ax.utils.common.typeutils import checked_cast
label_desc: Use image node_id 6 for calling the TestInstantiationtUtils obj's underlying member method code with example usage: obj.test_make_optimization_config() without return types