class_docstr: Hyper Parameter Searcher. A Tuner-like class.
class_docstr_tok: ["Hyper","Parameter","Searcher",".","A","Tuner-like","class","."]
code: def _run_search(self):
      # TODO do we need to set these trainer states?
      self.trainer.state.fn = TrainerFn.TUNING
      self.trainer.state.status = TrainerStatus.RUNNING
      self.trainer.tuning = True
  
      # run optimize
      self.study.optimize(self.objective, **self.run_kwargs)
  
      self.tune_end = False
      self.trainer.tuning = False
      # Force the train dataloader to reset as the batch size has changed
      # self.trainer.reset_train_dataloader(model)
      # self.trainer.reset_val_dataloader(model)
      self.trainer.state.status = TrainerStatus.FINISHED
      invalidInputError(
          self.trainer.state.stopped, "trainer state should be stopped"
      )
  
imports: from typing import Any
  import pytorch_lightning
  import copy
  import math
  from pytorch_lightning.trainer.states import TrainerFn, TrainerStatus
  from bigdl.nano.utils.common import invalidInputError
  from bigdl.nano.automl.hpo.backend import create_hpo_backend, SamplerType
  from .objective import Objective
  from ._helper import ResetCallback, CustomEvaluationLoop
  from bigdl.nano.automl.utils.parallel import run_parallel
  from bigdl.nano.automl.hpo.search import _search_summary, _end_search, _create_study, _validate_args, _prepare_args
label_desc: Use image node_id 3 for calling the HPOSearcher obj's underlying member method code with example usage: obj._run_search() without return types