class_docstr: Implements SMAC's default acquisition function optimization.
  
  This optimizer performs local search from the previous best points according to the acquisition function, uses the
  acquisition function to sort randomly sampled configurations. Random configurations are interleaved by the main SMAC
  code. The random configurations are retrieved from two different ConfigurationSpaces - one which uses priors
  (e.g. NormalFloatHP) and is defined by the user, and one that is a uniform version of the same space, i.e. with the
  priors removed.
  
  Parameters
  ----------
  configspace : ConfigurationSpace
      The original ConfigurationSpace specified by the user.
  uniform_configspace : ConfigurationSpace
      A version of the user-defined ConfigurationSpace where all parameters are uniform (or have their weights removed
      in the case of a categorical hyperparameter).
  acquisition_function : AbstractAcquisitionFunction | None, defaults to None
  challengers : int, defaults to 5000
      Number of challengers.
  max_steps: int, defaults to None
      [LocalSearch] Maximum number of steps that the local search will perform.
  n_steps_plateau_walk: int, defaults to 10
      [LocalSearch] number of steps during a plateau walk before local search terminates.
  local_search_iterations: int, defaults to 10
      [Local Search] number of local search iterations.
  prior_sampling_fraction: float, defaults to 0.5
      The ratio of random samples that are taken from the user-defined ConfigurationSpace, as opposed to the uniform
      version.
  seed : int, defaults to 0
class_docstr_tok: ["Implements","SMAC","'s","default","acquisition","function","optimization",".","This","optimizer","performs","local","search","from","the","previous","best","points","according","to","the","acquisition","function",",","uses","the","acquisition","function","to","sort","randomly","sampled","configurations",".","Random","configurations","are","interleaved","by","the","main","SMAC","code",".","The","random","configurations","are","retrieved","from","two","different","ConfigurationSpaces","-","one","which","uses","priors","(","e.g",".","NormalFloatHP",")","and","is","defined","by","the","user",",","and","one","that","is","a","uniform","version","of","the","same","space",",","i.e",".","with","the","priors","removed",".","Parameters","--","--","--","--","--","configspace",":","ConfigurationSpace","The","original","ConfigurationSpace","specified","by","the","user",".","uniform_configspace",":","ConfigurationSpace","A","version","of","the","user-defined","ConfigurationSpace","where","all","parameters","are","uniform","(","or","have","their","weights","removed","in","the","case","of","a","categorical","hyperparameter",")",".","acquisition_function",":","AbstractAcquisitionFunction","|","None",",","defaults","to","None","challengers",":","int",",","defaults","to","5000","Number","of","challengers",".","max_steps",":","int",",","defaults","to","None","[","LocalSearch","]","Maximum","number","of","steps","that","the","local","search","will","perform",".","n_steps_plateau_walk",":","int",",","defaults","to","10","[","LocalSearch","]","number","of","steps","during","a","plateau","walk","before","local","search","terminates",".","local_search_iterations",":","int",",","defaults","to","10","[","Local","Search","]","number","of","local","search","iterations",".","prior_sampling_fraction",":","float",",","defaults","to","0.5","The","ratio","of","random","samples","that","are","taken","from","the","user-defined","ConfigurationSpace",",","as","opposed","to","the","uniform","version",".","seed",":","int",",","defaults","to","0"]
code: def __init__(
      self,
      configspace: ConfigurationSpace,
      uniform_configspace: ConfigurationSpace,
      acquisition_function: AbstractAcquisitionFunction | None = None,
      challengers: int = 5000,
      max_steps: int | None = None,
      n_steps_plateau_walk: int = 10,
      local_search_iterations: int = 10,
      prior_sampling_fraction: float = 0.5,
      seed: int = 0,
  ) -> None:
      super().__init__(
          acquisition_function,
          configspace,
          challengers=challengers,
          seed=seed,
      )
  
      self._prior_random_search = RandomSearch(
          acquisition_function=acquisition_function,
          configspace=configspace,
          seed=seed,
      )
  
      self._uniform_random_search = RandomSearch(
          acquisition_function=acquisition_function,
          configspace=uniform_configspace,
          seed=seed,
      )
  
      self._local_search = LocalSearch(
          acquisition_function=acquisition_function,
          configspace=configspace,
          max_steps=max_steps,
          n_steps_plateau_walk=n_steps_plateau_walk,
          seed=seed,
      )
  
      self._local_search_iterations = local_search_iterations
      self._prior_sampling_fraction = prior_sampling_fraction
  
file_path: SMAC3/smac/acquisition/maximizer/local_and_random_search.py
imports: from __future__ import annotations
  from typing import Any
  from ConfigSpace import Configuration, ConfigurationSpace
  from smac.acquisition.function import AbstractAcquisitionFunction
  from smac.acquisition.maximizer.abstract_acqusition_maximizer import AbstractAcquisitionMaximizer
  from smac.acquisition.maximizer.local_search import LocalSearch
  from smac.acquisition.maximizer.random_search import RandomSearch
  from smac.utils.logging import get_logger
label_desc: Use image node_id 1 to create a new LocalAndSortedPriorRandomSearch object from inherited base classes: AbstractAcquisitionMaximizer with example: obj = LocalAndSortedPriorRandomSearch(configspace, uniform_configspace, acquisition_function, challengers, max_steps, n_steps_plateau_walk, local_search_iterations, prior_sampling_fraction, seed)