class_docstr: Record of the AxClient creation event. This can be used for telemetry in settings
  where many AxClients are being created either manually or programatically. In
  order to facilitate easy serialization only include simple types: numbers, strings,
  bools, and None.
class_docstr_tok: ["Record","of","the","AxClient","creation","event",".","This","can","be","used","for","telemetry","in","settings","where","many","AxClients","are","being","created","either","manually","or","programatically",".","In","order","to","facilitate","easy","serialization","only","include","simple","types",":","numbers",",","strings",",","bools",",","and","None","."]
code: def from_ax_client(cls, ax_client: AxClient) -> AxClientCreatedRecord:
      # Some AxClients may implement `batch_size`, those that do not use
      # one trial arms.
      if getattr(ax_client, "batch_size", None) is not None:
          # pyre-fixme[16] `AxClient` has no attribute `batch_size`
          arms_per_trial = ax_client.batch_size
      else:
          arms_per_trial = 1
  
      return cls(
          experiment_created_record=ExperimentCreatedRecord.from_experiment(
              experiment=ax_client.experiment
          ),
          generation_strategy_created_record=(
              GenerationStrategyCreatedRecord.from_generation_strategy(
                  generation_strategy=ax_client.generation_strategy
              )
          ),
          arms_per_trial=arms_per_trial,
          early_stopping_strategy_cls=(
              None
              if ax_client.early_stopping_strategy is None
              else ax_client.early_stopping_strategy.__class__.__name__
          ),
          global_stopping_strategy_cls=(
              None
              if ax_client.global_stopping_strategy is None
              else ax_client.global_stopping_strategy.__class__.__name__
          ),
          transformed_dimensionality=_get_max_transformed_dimensionality(
              search_space=ax_client.experiment.search_space,
              generation_strategy=ax_client.generation_strategy,
          ),
      )
  
file_path: Ax/ax/telemetry/ax_client.py
imports: from __future__ import annotations
  from dataclasses import asdict, dataclass
  from typing import Any, Dict, Optional
  from ax.service.ax_client import AxClient
  from ax.telemetry.common import _get_max_transformed_dimensionality
  from ax.telemetry.experiment import ExperimentCompletedRecord, ExperimentCreatedRecord
  from ax.telemetry.generation_strategy import GenerationStrategyCreatedRecord
label_desc: Use image node_id 1 for calling the AxClientCreatedRecord obj's underlying member method code with example usage: obj.from_ax_client(cls, ax_client) and returns: cls