class_docstr: Tree-structured Parzen Estimator (TPE) tuner.
  
  TPE is a lightweight tuner that has no extra dependency and supports all search space types,
  designed to be the default tuner.
  
  It has the drawback that TPE cannot discover relationship between different hyperparameters.
  
  **Implementation**
  
  TPE is an SMBO algorithm.
  It models P(x|y) and P(y) where x represents hyperparameters and y the evaluation result.
  P(x|y) is modeled by transforming the generative process of hyperparameters,
  replacing the distributions of the configuration prior with non-parametric densities.
  
  Paper: `Algorithms for Hyper-Parameter Optimization
  <https://proceedings.neurips.cc/paper/2011/file/86e8f7ab32cfd12577bc2619bc635690-Paper.pdf>`__
  
  Examples
  --------
  
  .. code-block::
  
      ## minimal config ##
  
      config.tuner.name = 'TPE'
      config.tuner.class_args = {
          'optimize_mode': 'maximize'
      }
  
  .. code-block::
  
      ## advanced config ##
  
      config.tuner.name = 'TPE'
      config.tuner.class_args = {
          'optimize_mode': maximize,
          'seed': 12345,
          'tpe_args': {
              'constant_liar_type': 'mean',
              'n_startup_jobs': 10,
              'n_ei_candidates': 20,
              'linear_forgetting': 100,
              'prior_weight': 0,
              'gamma': 0.5
          }
      }
  
  Parameters
  ----------
  optimze_mode: Literal['minimize', 'maximize']
      Whether optimize to minimize or maximize trial result.
  seed
      The random seed.
  tpe_args
      Advanced users can use this to customize TPE tuner.
      See :class:`TpeArguments` for details.
class_docstr_tok: ["Tree-structured","Parzen","Estimator","(","TPE",")","tuner",".","TPE","is","a","lightweight","tuner","that","has","no","extra","dependency","and","supports","all","search","space","types",",","designed","to","be","the","default","tuner",".","It","has","the","drawback","that","TPE","can","not","discover","relationship","between","different","hyperparameters",".","*","*","Implementation","*","*","TPE","is","an","SMBO","algorithm",".","It","models","P","(","x|y",")","and","P","(","y",")","where","x","represents","hyperparameters","and","y","the","evaluation","result",".","P","(","x|y",")","is","modeled","by","transforming","the","generative","process","of","hyperparameters",",","replacing","the","distributions","of","the","configuration","prior","with","non-parametric","densities",".","Paper",":","`","Algorithms","for","Hyper-Parameter","Optimization","<","https",":","\/\/proceedings.neurips.cc\/paper\/2011\/file\/86e8f7ab32cfd12577bc2619bc635690-Paper.pdf",">","`","__","Examples","--","--","--","--","..","code-block",":",":","#","#","minimal","config","#","#","config.tuner.name","=","'TPE'","config.tuner.class_args","=","{","'optimize_mode","'",":","'maximize'","}","..","code-block",":",":","#","#","advanced","config","#","#","config.tuner.name","=","'TPE'","config.tuner.class_args","=","{","'optimize_mode","'",":","maximize",",","'seed","'",":","12345",",","'tpe_args","'",":","{","'constant_liar_type","'",":","'mean","'",",","'n_startup_jobs","'",":","10",",","'n_ei_candidates","'",":","20",",","'linear_forgetting","'",":","100",",","'prior_weight","'",":","0",",","'gamma","'",":","0.5","}","}","Parameters","--","--","--","--","--","optimze_mode",":","Literal","[","'minimize","'",",","'maximize","'","]","Whether","optimize","to","minimize","or","maximize","trial","result",".","seed","The","random","seed",".","tpe_args","Advanced","users","can","use","this","to","customize","TPE","tuner",".","See",":","class",":","`","TpeArguments","`","for","details","."]
code: def update_search_space(self, space):
      self.space = format_search_space(space)
      self.dedup = Deduplicator(self.space)
  
imports: from __future__ import annotations
  from collections import defaultdict
  import logging
  import math
  from typing import Any, NamedTuple
  import numpy
  from scipy.special import erf
  from typing_extensions import Literal
  import nni
  from nni.common.hpo_utils import Deduplicator, OptimizeMode, format_search_space, deformat_parameters, format_parameters
  from nni.tuner import Tuner
  from nni.utils import extract_scalar_reward
  from .None import random_tuner
label_desc: Use image node_id 2 for calling the TpeTuner obj's underlying member method code with example usage: obj.update_search_space(space) without return types