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.
docstr: Args:
      params: Hyper-parameters to be tuned.
docstr_tok: ["Args",":","params",":","Hyper-parameters","to","be","tuned","."]
code: def fn(self, params: dict) -> dict:
      """
      Args:
          params: Hyper-parameters to be tuned.
      """
      st_time = time()
      extended_config = copy(params)
      self.logger.info(f"Optimizing parameters: {params}")
  
      _, test_result = self.experiment.run(extended_config)
      if not isinstance(test_result, dict):
          return {"status": hyperopt.STATUS_FAIL, "loss": None}
      ed_time = time()
  
      current_best = False
      if test_result["score"] > self.best_score:
          self.best_score = test_result["score"]
          self.best_trial = self._trial_count
          self.best_params = copy(params)
          current_best = True
  
      et = EpochTracker(
          self.metrics_for_best_model, metrics_results=test_result
      )
      et.epoch_info(
          desc="Trial",
          serial=self._trial_count,
          time_duration=ed_time - st_time,
          current_best=current_best,
          source=self.logger.info,
      )
  
      test_result["loss"] = test_result["score"]
      test_result["status"] = hyperopt.STATUS_OK
      del test_result["score"]
      self._trial_count += 1
      return test_result
  
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 2 for calling the HyperTuning obj's underlying member method code with example usage: obj.fn(params) and returns: test_result, dict