class_docstr: HyperTuning Class is used to manage the parameter tuning process of recommender system models.
  Given objective funciton, parameters range and optimization algorithm, using HyperTuning can find
  the best result among these parameters
  
  Note:
      HyperTuning is based on the hyperopt (https://github.com/hyperopt/hyperopt)
  
      Thanks to sbrodeur for the exhaustive search code.
      https://github.com/hyperopt/hyperopt/issues/200
class_docstr_tok: ["HyperTuning","Class","is","used","to","manage","the","parameter","tuning","process","of","recommender","system","models",".","Given","objective","funciton",",","parameters","range","and","optimization","algorithm",",","using","HyperTuning","can","find","the","best","result","among","these","parameters","Note",":","HyperTuning","is","based","on","the","hyperopt","(","https",":","\/\/github.com\/hyperopt\/hyperopt",")","Thanks","to","sbrodeur","for","the","exhaustive","search","code",".","https",":","\/\/github.com\/hyperopt\/hyperopt\/issues\/200"]
code: def __init__(
      self,
      objective_function,
      space=None,
      params_file=None,
      params_dict=None,
      fixed_config_file_list=None,
      display_file=None,
      algo="exhaustive",
      max_evals=100,
      early_stop=10,
  ):
      self.best_score = None
      self.best_params = None
      self.best_test_result = None
      self.params2result = {}
      self.params_list = []
      self.score_list = []
  
      self.objective_function = objective_function
      self.max_evals = max_evals
      self.fixed_config_file_list = fixed_config_file_list
      self.display_file = display_file
      if space:
          self.space = space
      elif params_file:
          self.space = self._build_space_from_file(params_file)
      elif params_dict:
          self.space = self._build_space_from_dict(params_dict)
      else:
          raise ValueError(
              "at least one of `space`, `params_file` and `params_dict` is provided"
          )
      if isinstance(algo, str):
          if algo == "exhaustive":
              self.algo = partial(
                  exhaustive_search, nbMaxSucessiveFailures=1000
              )
              self.max_evals = _spacesize(self.space)
          elif algo == "random":
              from hyperopt import rand
  
              self.algo = rand.suggest
          elif algo == "bayes":
              from hyperopt import tpe
  
              self.algo = tpe.suggest
          else:
              raise ValueError("Illegal algo [{}]".format(algo))
      else:
          self.algo = algo
      from hyperopt.early_stop import no_progress_loss
  
      self.early_stop_fn = no_progress_loss(early_stop)
  
imports: from functools import partial
  import numpy
  from recbole.utils.utils import dict2str
label_desc: Use image node_id 1 to create a new HyperTuning object from inherited base classes: object with example: obj = HyperTuning(objective_function, space, params_file, params_dict, fixed_config_file_list, display_file, algo, max_evals, early_stop)