class_docstr: Bayesian Optimization with HyperBand
  
  This class is a wrapper around the library HpBandSter:
  https://github.com/automl/HpBandSter.
  
  For more information on the algorithm,
  see original paper at https://arxiv.org/abs/1807.01774.
  
  Falkner, Stefan, Aaron Klein, and Frank Hutter. "BOHB: Robust and efficient hyperparameter
  optimization at scale." In International Conference on Machine Learning, pp. 1437-1446. PMLR,
  2018.
  
  Parameters
  ----------
  space: `orion.algo.space.Space`
      Optimisation space with priors for each dimension.
  seed: None, int or sequence of int
      Seed for the random number generator used to sample new trials.
      Default: ``None``
  min_points_in_model: int
      Number of observations to start building a KDE. If ``None``, uses number
      of dimensions in the search space + 1. Default: ``None``
  top_n_percent: int
      Percentage ( between 1 and 99) of the observations that are considered good. Default: 15
  num_samples: int
      Number of samples to optimize Expected Improvement. Default: 64
  random_fraction: float
      Fraction of purely random configurations that are sampled from the
      prior without the model. Default: 1/3
  bandwidth_factor: float
      To encourage diversity, the points proposed to optimize EI, are sampled
      from a 'widened' KDE where the bandwidth is multiplied by this factor. Default: 3
  min_bandwidth: float
      To keep diversity, even when all (good) samples have the same value
      for one of the parameters, a minimum bandwidth is used instead of
      zero. Default: 1e-3
  parallel_strategy: dict or None, optional
      The configuration of a parallel strategy to use for pending trials or broken trials.
      Default is a MaxParallelStrategy for broken trials and NoParallelStrategy for pending
      trials.
class_docstr_tok: ["Bayesian","Optimization","with","HyperBand","This","class","is","a","wrapper","around","the","library","HpBandSter",":","https",":","\/\/github.com\/automl\/HpBandSter",".","For","more","information","on","the","algorithm",",","see","original","paper","at","https",":","\/\/arxiv.org\/abs\/1807.01774",".","Falkner",",","Stefan",",","Aaron","Klein",",","and","Frank","Hutter",".","``","BOHB",":","Robust","and","efficient","hyperparameter","optimization","at","scale",".","''","In","International","Conference","on","Machine","Learning",",","pp",".","1437-1446",".","PMLR",",","2018",".","Parameters","--","--","--","--","--","space",":","`","orion.algo.space.Space","`","Optimisation","space","with","priors","for","each","dimension",".","seed",":","None",",","int","or","sequence","of","int","Seed","for","the","random","number","generator","used","to","sample","new","trials",".","Default",":","``","None","``","min_points_in_model",":","int","Number","of","observations","to","start","building","a","KDE",".","If","``","None","``",",","uses","number","of","dimensions","in","the","search","space","+","1",".","Default",":","``","None","``","top_n_percent",":","int","Percentage","(","between","1","and","99",")","of","the","observations","that","are","considered","good",".","Default",":","15","num_samples",":","int","Number","of","samples","to","optimize","Expected","Improvement",".","Default",":","64","random_fraction",":","float","Fraction","of","purely","random","configurations","that","are","sampled","from","the","prior","without","the","model",".","Default",":","1\/3","bandwidth_factor",":","float","To","encourage","diversity",",","the","points","proposed","to","optimize","EI",",","are","sampled","from","a","'widened","'","KDE","where","the","bandwidth","is","multiplied","by","this","factor",".","Default",":","3","min_bandwidth",":","float","To","keep","diversity",",","even","when","all","(","good",")","samples","have","the","same","value","for","one","of","the","parameters",",","a","minimum","bandwidth","is","used","instead","of","zero",".","Default",":","1e-3","parallel_strategy",":","dict","or","None",",","optional","The","configuration","of","a","parallel","strategy","to","use","for","pending","trials","or","broken","trials",".","Default","is","a","MaxParallelStrategy","for","broken","trials","and","NoParallelStrategy","for","pending","trials","."]
code: def _make_iteration(self, iteration):
      ss = self.max_sh_iter - 1 - (iteration % self.max_sh_iter)
  
      # number of configurations in that bracket
      n0 = int(np.floor((self.max_sh_iter) / (ss + 1)) * self.eta**ss)
      ns = [max(int(n0 * (self.eta ** (-i))), 1) for i in range(ss + 1)]
  
      return SuccessiveHalving(
          HPB_iter=iteration,
          num_configs=ns,
          budgets=self.budgets[(-ss - 1) :],
          config_sampler=self.bohb.get_config,
      )
  
imports: import copy
  import numpy
  from orion.algo.base import BaseAlgorithm
  from orion.algo.base.parallel_strategy import strategy_factory
  from orion.algo.space import Fidelity
  from orion.core.utils.format_trials import dict_to_trial
  from orion.core.utils.module_import import ImportOptional
label_desc: Use image node_id 3 for calling the BOHB obj's underlying member method code with example usage: obj._make_iteration(iteration) and returns: SuccessiveHalving