code: def __init__(self, config):
      super(HyperbandProposer, self).__init__(config)
      self.verify_config(config)
      self.target = -1 if config["target"] == "max" else 1
      self.max_iter = config["max_iter"]
      self.eta = config["eta"]
      self.skip_last = config["skip_last"]
      self.s_max = int(log(self.max_iter) / log(self.eta))
      self.B = (self.s_max + 1) * self.max_iter
  
      self.results = []
  
      self.best_counter = -1
      self.s = self.s_max + 1
      self.config = config
  
      self.nSamples = 0
      for s in reversed(range(self.s_max + 1)):
          self.nSamples += int(
              ceil(self.B / self.max_iter / (s + 1) * self.eta**s)
          )
      logger.info("Total number of samples is %d" % self.nSamples)
      set_default_keyvalue("random_seed", 0, config)
      random.seed(config["random_seed"])
      self.t = 0
      self.i = 0
      self.n = 0
      self.test_set = []
      self.r = 0
      self.n_configs = 0
      self.n_iterations = 0
      self.scores = {}
      self.setup(self.s_max)
  
file_path: auptimizer/src/aup/Proposer/HyperbandProposer.py
imports: import logging
  import random
  from math import log, ceil
  from six.moves import input
  from aup.Proposer import get_proposer
  from .AbstractProposer import AbstractProposer
  from ..utils import set_default_keyvalue, get_from_options
label_desc: Use image node_id 1 to create a new HyperbandProposer object from inherited base classes: AbstractProposer with example: obj = HyperbandProposer(config)