class_docstr: Basic search algorithm settings.
class_docstr_tok: ["Basic","search","algorithm","settings","."]
docstr: Overwrite the config random state.
  
  Search algorithms refer to random state by different names, however we want to overwrite unset random states
  with the Ludwig random state. This method uses a registry of random state field names to provide a single
  interface across all search algorithms.
docstr_tok: ["Overwrite","the","config","random","state",".","Search","algorithms","refer","to","random","state","by","different","names",",","however","we","want","to","overwrite","unset","random","states","with","the","Ludwig","random","state",".","This","method","uses","a","registry","of","random","state","field","names","to","provide","a","single","interface","across","all","search","algorithms","."]
code: def set_random_state(self, ludwig_random_state: int) -> None:
      """Overwrite the config random state.
  
      Search algorithms refer to random state by different names, however we want to overwrite unset random states
      with the Ludwig random state. This method uses a registry of random state field names to provide a single
      interface across all search algorithms.
      """
      rs_field = hyperopt_utils.get_search_algorithm_random_state_field(
          self.type
      )
      if (
          rs_field is not None
          and self.__getattribute__(rs_field) is None
      ):
          self.__setattr__(rs_field, ludwig_random_state)
  
imports: from dataclasses import field
  from importlib import import_module
  from typing import Dict, List, Optional
  from marshmallow import fields, ValidationError
  from ludwig.api_annotations import DeveloperAPI
  from ludwig.schema import utils
  from ludwig.schema.hyperopt import utils
  from ludwig.schema.utils import ludwig_dataclass
label_desc: Use image node_id 1 for calling the BaseSearchAlgorithmConfig obj's underlying member method code with example usage: obj.set_random_state(ludwig_random_state) without return types