class_docstr: Class to interface with the Ax Platform
class_docstr_tok: ["Class","to","interface","with","the","Ax","Platform"]
docstr: Method to setup the Ax Client
docstr_tok: ["Method","to","setup","the","Ax","Client"]
code: def setup_ax_client(self, arguments: List[str]) -> AxClient:
      """Method to setup the Ax Client"""
      parameters: List[Dict[Any, Any]] = []
      for key, value in self.ax_params.items():
          param = OmegaConf.to_container(value, resolve=True)
          assert isinstance(param, Dict)
          if param["type"] == "range":
              bounds = param["bounds"]
              if not (all(isinstance(x, int) for x in bounds)):
                  # Type mismatch. Promote all to float
                  param["bounds"] = [float(x) for x in bounds]
  
          parameters.append(param)
          parameters[-1]["name"] = key
      commandline_params = self.parse_commandline_args(arguments)
      for cmd_param in commandline_params:
          for param in parameters:
              if param["name"] == cmd_param["name"]:
                  for key, value in cmd_param.items():
                      param[key] = value
                  break
          else:
              parameters.append(cmd_param)
  
      log.info(
          f"AxSweeper is optimizing the following parameters: {encoder_parameters_into_string(parameters)}"
      )
      ax_client = AxClient(
          verbose_logging=self.ax_client_config.verbose_logging,
          random_seed=self.ax_client_config.random_seed,
      )
      ax_client.create_experiment(
          parameters=parameters, **self.experiment
      )
  
      return ax_client
  
imports: import logging
  from dataclasses import dataclass
  from typing import Any, Dict, Iterable, List, Mapping, Optional, Tuple, Union
  from ax.core import types
  from ax.exceptions.core import SearchSpaceExhausted
  from ax.service.ax_client import AxClient
  from hydra.core.override_parser.overrides_parser import OverridesParser
  from hydra.core.override_parser.types import IntervalSweep, Override, Transformer
  from hydra.core.plugins import Plugins
  from hydra.plugins.launcher import Launcher
  from hydra.plugins.sweeper import Sweeper
  from hydra.types import HydraContext, TaskFunction
  from omegaconf import DictConfig, OmegaConf
  from ._earlystopper import EarlyStopper
  from .config import AxConfig, ClientConfig, ExperimentConfig
label_desc: Use image node_id 5 for calling the CoreAxSweeper obj's underlying member method code with example usage: obj.setup_ax_client(arguments) and returns: ax_client