class_docstr: Class that contains methods for storing an Ax experiment to SQLAlchemy.
  
  Instantiate with an instance of Config to customize the functionality.
  For even more flexibility, create a subclass.
  
  Attributes:
      config: Metadata needed to save and load an experiment to SQLAlchemy.
class_docstr_tok: ["Class","that","contains","methods","for","storing","an","Ax","experiment","to","SQLAlchemy",".","Instantiate","with","an","instance","of","Config","to","customize","the","functionality",".","For","even","more","flexibility",",","create","a","subclass",".","Attributes",":","config",":","Metadata","needed","to","save","and","load","an","experiment","to","SQLAlchemy","."]
docstr: Convert Ax Multi Objective to SQLAlchemy.
  
  Returns: A parent `SQAMetric`, whose children are the `SQAMetric`-s
      corresponding to `metrics` attribute of `MultiObjective`.
      NOTE: The parent is used as a placeholder for storage purposes.
code: def multi_objective_to_sqa(
      self, multi_objective: MultiObjective
  ) -> SQAMetric:
      """Convert Ax Multi Objective to SQLAlchemy.
  
      Returns: A parent `SQAMetric`, whose children are the `SQAMetric`-s
          corresponding to `metrics` attribute of `MultiObjective`.
          NOTE: The parent is used as a placeholder for storage purposes.
      """
      # Constructing children SQAMetric classes (these are the real metrics in
      # the `MultiObjective`).
      children_objectives = []
      for objective in multi_objective.objectives:
          objective_cls = cast(
              SQAMetric, self.config.class_to_sqa_class[Metric]
          )
          type_and_properties = self.get_metric_type_and_properties(
              metric=objective.metric
          )
          children_objectives.append(
              objective_cls(  # pyre-ignore[29]: `SQAMetric` is not a func.
                  id=objective.metric.db_id,
                  name=objective.metric.name,
                  metric_type=type_and_properties[0],
                  intent=MetricIntent.OBJECTIVE,
                  minimize=objective.minimize,
                  properties=type_and_properties[1],
                  lower_is_better=objective.metric.lower_is_better,
              )
          )
  
      # Constructing a parent SQAMetric class (not a real metric, only a placeholder
      # to group the metrics together).
      parent_metric_cls = cast(
          SQAMetric, self.config.class_to_sqa_class[Metric]
      )
      parent_metric = parent_metric_cls(  # pyre-ignore[29]: `SQAMetric` is not a func.
          id=multi_objective.db_id,
          name="multi_objective",
          metric_type=self.config.metric_registry[Metric],
          intent=MetricIntent.MULTI_OBJECTIVE,
          scalarized_objective_children_metrics=children_objectives,
      )
      return parent_metric
  
imports: from enum import Enum
  from logging import Logger
  from typing import Any, cast, Dict, List, Optional, Tuple, Type
  from ax.core.arm import Arm
  from ax.core.base_trial import BaseTrial
  from ax.core.batch_trial import AbandonedArm, BatchTrial
  from ax.core.data import Data
  from ax.core.experiment import Experiment
  from ax.core.generator_run import GeneratorRun, GeneratorRunType
  from ax.core.metric import Metric
  from ax.core.multi_type_experiment import MultiTypeExperiment
  from ax.core.objective import MultiObjective, Objective, ScalarizedObjective
  from ax.core.optimization_config import MultiObjectiveOptimizationConfig, OptimizationConfig
  from ax.core.outcome_constraint import ObjectiveThreshold, OutcomeConstraint, ScalarizedOutcomeConstraint
  from ax.core.parameter import ChoiceParameter, FixedParameter, Parameter, RangeParameter
  from ax.core.parameter_constraint import OrderConstraint, ParameterConstraint, SumConstraint
  from ax.core.parameter_distribution import ParameterDistribution
  from ax.core.risk_measures import RiskMeasure
  from ax.core.runner import Runner
  from ax.core.search_space import RobustSearchSpace, SearchSpace
  from ax.core.trial import Trial
  from ax.exceptions.storage import SQAEncodeError
  from ax.modelbridge.generation_strategy import GenerationStrategy
  from ax.storage.json_store.encoder import object_to_json
  from ax.storage.sqa_store.sqa_classes import SQAAbandonedArm, SQAArm, SQAData, SQAExperiment, SQAGenerationStrategy, SQAGeneratorRun, SQAMetric, SQAParameter, SQAParameterConstraint, SQARunner, SQATrial
  from ax.storage.sqa_store.sqa_config import SQAConfig
  from ax.storage.utils import DomainType, MetricIntent, ParameterConstraintType
  from ax.utils.common.base import Base
  from ax.utils.common.constants import Keys
  from ax.utils.common.logger import get_logger
  from ax.utils.common.serialization import serialize_init_args
  from ax.utils.common.typeutils import checked_cast, not_none
label_desc: Use image node_id 15 for calling the Encoder obj's underlying member method code with example usage: obj.multi_objective_to_sqa(multi_objective) and returns: parent_metric