class_docstr: Record of the "Optimization" creation event. This can come from either an
  AxClient or a Scheduler. This Record is especially useful for logging Ax-backed
  optimization results to a tabular database (i.e. one row per Record).
class_docstr_tok: ["Record","of","the","``","Optimization","''","creation","event",".","This","can","come","from","either","an","AxClient","or","a","Scheduler",".","This","Record","is","especially","useful","for","logging","Ax-backed","optimization","results","to","a","tabular","database","(","i.e",".","one","row","per","Record",")","."]
code: def from_scheduler(
      cls,
      scheduler: Scheduler,
      unique_identifier: str,
      product_surface: str,
      launch_surface: str,
      deployed_job_id: int,
      trial_evaluation_identifier: Optional[str],
      is_manual_generation_strategy: bool,
      warm_started_from: Optional[str],
      num_custom_trials: int,
      support_tier: str,
  ) -> OptimizationCreatedRecord:
      scheduler_created_record = SchedulerCreatedRecord.from_scheduler(
          scheduler=scheduler
      )
  
      experiment_created_record = (
          scheduler_created_record.experiment_created_record
      )
      generation_strategy_created_record = (
          scheduler_created_record.generation_strategy_created_record
      )
  
      return cls(
          experiment_name=experiment_created_record.experiment_name,
          experiment_type=experiment_created_record.experiment_type,
          num_continuous_range_parameters=(
              experiment_created_record.num_continuous_range_parameters
          ),
          num_int_range_parameters_small=(
              experiment_created_record.num_int_range_parameters_small
          ),
          num_int_range_parameters_medium=(
              experiment_created_record.num_int_range_parameters_medium
          ),
          num_int_range_parameters_large=(
              experiment_created_record.num_int_range_parameters_large
          ),
          num_log_scale_range_parameters=(
              experiment_created_record.num_log_scale_range_parameters
          ),
          num_unordered_choice_parameters_small=(
              experiment_created_record.num_unordered_choice_parameters_small
          ),
          num_unordered_choice_parameters_medium=(
              experiment_created_record.num_unordered_choice_parameters_medium
          ),
          num_unordered_choice_parameters_large=(
              experiment_created_record.num_unordered_choice_parameters_large
          ),
          num_fixed_parameters=experiment_created_record.num_fixed_parameters,
          dimensionality=experiment_created_record.dimensionality,
          hierarchical_tree_height=experiment_created_record.hierarchical_tree_height,
          num_parameter_constraints=(
              experiment_created_record.num_parameter_constraints
          ),
          num_objectives=experiment_created_record.num_objectives,
          num_tracking_metrics=experiment_created_record.num_tracking_metrics,
          num_outcome_constraints=experiment_created_record.num_outcome_constraints,
          num_map_metrics=experiment_created_record.num_map_metrics,
          metric_cls_to_quantity=experiment_created_record.metric_cls_to_quantity,
          runner_cls=experiment_created_record.runner_cls,
          generation_strategy_name=(
              generation_strategy_created_record.generation_strategy_name
          ),
          num_requested_initialization_trials=(
              generation_strategy_created_record.num_requested_initialization_trials
          ),
          num_requested_bayesopt_trials=(
              generation_strategy_created_record.num_requested_bayesopt_trials
          ),
          num_requested_other_trials=(
              generation_strategy_created_record.num_requested_other_trials
          ),
          max_parallelism=generation_strategy_created_record.max_parallelism,
          early_stopping_strategy_cls=(
              scheduler_created_record.early_stopping_strategy_cls
          ),
          global_stopping_strategy_cls=(
              scheduler_created_record.global_stopping_strategy_cls
          ),
          transformed_dimensionality=(
              scheduler_created_record.transformed_dimensionality
          ),
          scheduler_total_trials=scheduler_created_record.scheduler_total_trials,
          scheduler_max_pending_trials=(
              scheduler_created_record.scheduler_max_pending_trials
          ),
          arms_per_trial=scheduler_created_record.arms_per_trial,
          unique_identifier=unique_identifier,
          product_surface=product_surface,
          launch_surface=launch_surface,
          deployed_job_id=deployed_job_id,
          trial_evaluation_identifier=trial_evaluation_identifier,
          is_manual_generation_strategy=is_manual_generation_strategy,
          warm_started_from=warm_started_from,
          num_custom_trials=num_custom_trials,
          support_tier=support_tier,
      )
  
file_path: Ax/ax/telemetry/optimization.py
imports: from __future__ import annotations
  from dataclasses import dataclass
  from typing import Dict, Optional, Union
  from ax.core.experiment import Experiment
  from ax.modelbridge.generation_strategy import GenerationStrategy
  from ax.service.ax_client import AxClient
  from ax.service.scheduler import Scheduler
  from ax.telemetry.ax_client import AxClientCompletedRecord, AxClientCreatedRecord
  from ax.telemetry.common import _get_max_transformed_dimensionality, DEFAULT_PRODUCT_SURFACE, get_unique_identifier
  from ax.telemetry.experiment import ExperimentCreatedRecord
  from ax.telemetry.generation_strategy import GenerationStrategyCreatedRecord
  from ax.telemetry.scheduler import SchedulerCompletedRecord, SchedulerCreatedRecord
label_desc: Use image node_id 1 for calling the OptimizationCreatedRecord obj's underlying member method code with example usage: obj.from_scheduler(cls, scheduler, unique_identifier, product_surface, launch_surface, deployed_job_id, trial_evaluation_identifier, is_manual_generation_strategy, warm_started_from, num_custom_trials, support_tier) and returns: cls