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 _build_space_from_dict(config_dict):
      from hyperopt import hp
  
      space = {}
      for para_type in config_dict:
          if para_type == "choice":
              for para_name in config_dict["choice"]:
                  para_value = config_dict["choice"][para_name]
                  space[para_name] = hp.choice(para_name, para_value)
          elif para_type == "uniform":
              for para_name in config_dict["uniform"]:
                  para_value = config_dict["uniform"][para_name]
                  low = para_value[0]
                  high = para_value[1]
                  space[para_name] = hp.uniform(
                      para_name, float(low), float(high)
                  )
          elif para_type == "quniform":
              for para_name in config_dict["quniform"]:
                  para_value = config_dict["quniform"][para_name]
                  low = para_value[0]
                  high = para_value[1]
                  q = para_value[2]
                  space[para_name] = hp.quniform(
                      para_name, float(low), float(high), float(q)
                  )
          elif para_type == "loguniform":
              for para_name in config_dict["loguniform"]:
                  para_value = config_dict["loguniform"][para_name]
                  low = para_value[0]
                  high = para_value[1]
                  space[para_name] = hp.loguniform(
                      para_name, float(low), float(high)
                  )
          else:
              raise ValueError(
                  "Illegal param type [{}]".format(para_type)
              )
      return space
  
imports: from functools import partial
  import numpy
  from recbole.utils.utils import dict2str
label_desc: Use image node_id 3 for calling the HyperTuning obj's underlying member method code with example usage: obj._build_space_from_dict(config_dict) and returns: space