class_docstr: Hyperparameters optimizing.
  
  You can inherit and re-implement `fn()` to modify the process.
  
  Args:
      model: The name of model.
      dataset: The name of dataset.
      base_config_file_list: A list of filenames of base configuration files
      base_config_dict: A list of dictionary of base configuration
      space: The search space.
      algo: The algorithm to be adapted.
code: def __init__(
      self,
      model: Optional[str],
      dataset: Optional[str],
      base_config_file_list: list,
      base_config_dict: dict,
      space: Union[SpaceType, str],
      algo: Union[Callable, str],
  ):
      if isinstance(space, dict):
          self.space = space
      elif isinstance(space, str):
          self.space = self._build_space_from_file(space)
      else:
          raise ValueError(
              f"Unrecognized search space configuration {space}."
          )
  
      if isinstance(algo, str):
          algo = algo.split(".")[-1]
          self.algo = (
              getattr(self, algo)
              if hasattr(self, algo)
              else getattr(hyperopt.tpe, algo)
          )
      elif callable(algo):
          self.algo = algo
      else:
          raise ValueError(
              f"Unrecognized algorithm configuration {space}."
          )
  
      self.max_evals = _space_size(self.space)
  
      self.base_config_kwargs = dict(
          model=model,
          dataset=dataset,
          config_file_list=base_config_file_list,
      )
      self.base_config_dict = base_config_dict
      self.base_config_dict["_hyper_tuning"] = list(self.space.keys())
      self.base_config_dict["disable_tqdm"] = True
      self.base_config_dict.setdefault("max_save", 1)
      self.experiment = Experiment(
          model, dataset, base_config_file_list, base_config_dict
      )
      self.config = self.experiment.get_config()
      self.metrics_for_best_model = self.config[
          "metrics_for_best_model"
      ]
      getLogger("textbox").setLevel(logging.WARNING)
      self.logger = getLogger("hyper_tuning")
      self.logger.disabled = False
      self._trial_count = 0
      self.best_trial = -1
      self.best_score = -math.inf
      self.best_params = None
  
imports: import logging
  import math
  from copy import copy
  from logging import getLogger
  from time import time
  from typing import Optional, Dict, Any, Callable, Union, Iterable, Iterator
  import hyperopt
  import numpy
  from hyperopt import fmin, hp, pyll
  from hyperopt.base import miscs_update_idxs_vals
  from hyperopt.pyll.base import Apply
  from .experiment import Experiment
  from ..utils.dashboard import EpochTracker
label_desc: Use image node_id 1 to create a new HyperTuning object  with example: obj = HyperTuning(model, dataset, base_config_file_list, base_config_dict, space, algo)