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"]
docstr: Given a set of parameters, return results and optimization status
  
  Args:
      params (dict): the parameter dictionary
docstr_tok: ["Given","a","set","of","parameters",",","return","results","and","optimization","status","Args",":","params","(","dict",")",":","the","parameter","dictionary"]
code: def trial(self, params):
      r"""Given a set of parameters, return results and optimization status
  
      Args:
          params (dict): the parameter dictionary
      """
      import hyperopt
  
      config_dict = params.copy()
      params_str = self.params2str(params)
      self.params_list.append(params_str)
      print("running parameters:", config_dict)
      result_dict = self.objective_function(
          config_dict, self.fixed_config_file_list
      )
      self.params2result[params_str] = result_dict
      model, score, bigger = (
          result_dict["model"],
          result_dict["best_valid_score"],
          result_dict["valid_score_bigger"],
      )
      self.model = model
      self.score_list.append(score)
  
      if not self.best_score:
          self.best_score = score
          self.best_params = params
          self._print_result(result_dict)
      else:
          if bigger:
              if score > self.best_score:
                  self.best_score = score
                  self.best_params = params
                  self._print_result(result_dict)
          else:
              if score < self.best_score:
                  self.best_score = score
                  self.best_params = params
                  self._print_result(result_dict)
  
      if bigger:
          score = -score
      return {"loss": score, "status": hyperopt.STATUS_OK}
  
imports: from functools import partial
  import numpy
  from recbole.utils.utils import dict2str
label_desc: Use image node_id 7 for calling the HyperTuning obj's underlying member method code with example usage: obj.trial(params) and returns: dict