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","."]
docstr: Unpack the idxs-vals format into the list of dictionaries that is
  `misc`.
  
  Parameters
  ----------
  idxs_map : dict
      idxs_map is a dictionary of id->id mappings so that the misc['idxs'] can
  contain different numbers than the idxs argument.
docstr_tok: ["Unpack","the","idxs-vals","format","into","the","list","of","dictionaries","that","is","`","misc","`",".","Parameters","--","--","--","--","--","idxs_map",":","dict","idxs_map","is","a","dictionary","of","id-",">","id","mappings","so","that","the","misc","[","'idxs","'","]","can","contain","different","numbers","than","the","idxs","argument","."]
code: def _miscs_update_idxs_vals(
      self, miscs, idxs, vals, assert_all_vals_used=True, idxs_map=None
  ):
      """
      Unpack the idxs-vals format into the list of dictionaries that is
      `misc`.
  
      Parameters
      ----------
      idxs_map : dict
          idxs_map is a dictionary of id->id mappings so that the misc['idxs'] can
      contain different numbers than the idxs argument.
      """
      if idxs_map is None:
          idxs_map = {}
  
      assert set(idxs.keys()) == set(vals.keys())
  
      misc_by_id = {m["tid"]: m for m in miscs}
      for m in miscs:
          m["idxs"] = {key: [] for key in idxs}
          m["vals"] = {key: [] for key in idxs}
  
      for key in idxs:
          assert len(idxs[key]) == len(vals[key])
          for tid, val in zip(idxs[key], vals[key]):
              tid = idxs_map.get(tid, tid)
              if assert_all_vals_used or tid in misc_by_id:
                  misc_by_id[tid]["idxs"][key] = [tid]
                  misc_by_id[tid]["vals"][key] = [val]
  
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 6 for calling the HyperoptTuner obj's underlying member method code with example usage: obj._miscs_update_idxs_vals(miscs, idxs, vals, assert_all_vals_used, idxs_map) without return types