class_docstr: Searcher which randomly samples configurations to try next.
class_docstr_tok: ["Searcher","which","randomly","samples","configurations","to","try","next","."]
docstr: Sample a new configuration at random
  
  Returns
  -------
  A new configuration that is valid.
docstr_tok: ["Sample","a","new","configuration","at","random","Returns","--","--","--","-","A","new","configuration","that","is","valid","."]
code: def get_config(self, **kwargs) -> dict:
      """Sample a new configuration at random
  
      Returns
      -------
      A new configuration that is valid.
      """
      if self._first_is_default and (not self._results):
          # Try default config first
          new_config = self._params_default
      else:
          new_config = self._sample_config()
      num_tries = 1
      while self._pickle_config(new_config) in self._results:
          if num_tries > self.MAX_RETRIES:
              if self._num_configs is not None:
                  num_results = len(self._results)
                  logger.log(
                      30,
                      f"Stopping HPO due to exhausted search space: {num_results} of {self._num_configs} possible configs ran.",
                  )
                  raise ExhaustedSearchSpaceError
              assert (
                  num_tries <= self.MAX_RETRIES
              ), f"Cannot find new config in LocalRandomSearcher, even after {self.MAX_RETRIES} trials"
          new_config = self._sample_config()
          num_tries += 1
      self._add_result(new_config, self._reward_while_pending())
      return new_config
  
file_path: autogluon/core/src/autogluon/core/searcher/local_random_searcher.py
imports: import logging
  import numpy
  from sklearn.model_selection import ParameterSampler
  from autogluon.common import space
  from .exceptions import ExhaustedSearchSpaceError
  from .local_searcher import LocalSearcher
label_desc: Use image node_id 5 for calling the LocalRandomSearcher obj's underlying member method code with example usage: obj.get_config() and returns: new_config