class_docstr: NNI wraps `hyperopt <https://github.com/hyperopt/hyperopt>`__ to provide anneal tuner.
  
  This simple annealing algorithm begins by sampling from the prior
  but tends over time to sample from points closer and closer to the best ones observed.
  This algorithm is a simple variation of random search that leverages smoothness in the response surface.
  The annealing rate is not adaptive.
  
  Note that it needs additional installation using the following command:
  
  .. code-block:: bash
  
      pip install nni[Anneal]
  
  Examples
  --------
  
  .. code-block::
  
      config.tuner.name = 'Anneal'
      config.tuner.class_args = {
          'optimize_mode': 'minimize'
      }
  
  Parameters
  ----------
  optimze_mode: 'minimize' or 'maximize'
      Whether optimize to minimize or maximize trial result.
class_docstr_tok: ["NNI","wraps","`","hyperopt","<","https",":","\/\/github.com\/hyperopt\/hyperopt",">","`","__","to","provide","anneal","tuner",".","This","simple","annealing","algorithm","begins","by","sampling","from","the","prior","but","tends","over","time","to","sample","from","points","closer","and","closer","to","the","best","ones","observed",".","This","algorithm","is","a","simple","variation","of","random","search","that","leverages","smoothness","in","the","response","surface",".","The","annealing","rate","is","not","adaptive",".","Note","that","it","needs","additional","installation","using","the","following","command",":","..","code-block",":",":","bash","pip","install","nni","[","Anneal","]","Examples","--","--","--","--","..","code-block",":",":","config.tuner.name","=","'Anneal'","config.tuner.class_args","=","{","'optimize_mode","'",":","'minimize'","}","Parameters","--","--","--","--","--","optimze_mode",":","'minimize","'","or","'maximize'","Whether","optimize","to","minimize","or","maximize","trial","result","."]
code: def generate_parameters(self, parameter_id, **kwargs):
      total_params = self._get_suggestion(random_search=False)
      # avoid generating same parameter with concurrent trials because hyperopt doesn't support parallel mode
      if total_params in self.total_data.values():
          # but it can cause duplicate parameter rarely
          total_params = self._get_suggestion(random_search=True)
      self.total_data[parameter_id] = total_params
  
      if self.parallel:
          self.running_data.append(parameter_id)
  
      params = split_index(total_params)
      return params
  
imports: import copy
  import logging
  import hyperopt
  import numpy
  from schema import Optional, Schema
  from nni import ClassArgsValidator
  from nni.common.hpo_utils import validate_search_space
  from nni.tuner import Tuner
  from nni.utils import NodeType, OptimizeMode, extract_scalar_reward, split_index
label_desc: Use image node_id 4 for calling the HyperoptTuner obj's underlying member method code with example usage: obj.generate_parameters(parameter_id) and returns: params