class_docstr: Hyper Parameter Searcher. A Tuner-like class.
class_docstr_tok: ["Hyper","Parameter","Searcher",".","A","Tuner-like","class","."]
docstr: Init a HPO Searcher.
  
  :param trainer: The pl.Trainer object.
docstr_tok: ["Init","a","HPO","Searcher",".",":","param","trainer",":","The","pl.Trainer","object","."]
code: def __init__(
      self, trainer: "pl.Trainer", num_processes: int = 1
  ) -> None:
      """
      Init a HPO Searcher.
  
      :param trainer: The pl.Trainer object.
      """
      self.trainer = trainer
      self.num_process = num_processes
      if num_processes == 1:
          callbacks = self.trainer.callbacks or []
          callbacks.append(ResetCallback())
          self.trainer.callbacks = callbacks
  
      self.model_class = pl.LightningModule
      self.study = None
      self.objective = None
      self.tune_end = False
      self._lazymodel = None
      self.backend = create_hpo_backend()
      self.create_kwargs = None
      self.run_kwargs = None
      self.fit_kwargs = None
  
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 1 to create a new HPOSearcher object  with example: obj = HPOSearcher(trainer, num_processes)