docstr: function to sample a new configuration
  
  This function is called inside Hyperband to query a new configuration
  
  
  Parameters:
  -----------
  budget: float
      the budget for which this configuration is scheduled
  
  returns: config
      should return a valid configuration
docstr_tok: ["function","to","sample","a","new","configuration","This","function","is","called","inside","Hyperband","to","query","a","new","configuration","Parameters",":","--","--","--","--","--","-","budget",":","float","the","budget","for","which","this","configuration","is","scheduled","returns",":","config","should","return","a","valid","configuration"]
code: def get_config(self, budget):
      """
      function to sample a new configuration
  
      This function is called inside Hyperband to query a new configuration
  
  
      Parameters:
      -----------
      budget: float
          the budget for which this configuration is scheduled
  
      returns: config
          should return a valid configuration
  
      """
      self.lock.acquire()
      if not self.is_trained:
          c = self.config_space.sample_configuration().get_array()
      else:
          candidates = np.array(
              [
                  self.config_space.sample_configuration().get_array()
                  for _ in range(self.n_candidates)
              ]
          )
  
          # We are only interested on the asymptotic value
          projected_candidates = np.concatenate(
              (candidates, np.ones([self.n_candidates, 1])), axis=1
          )
  
          # Compute the upper confidence bound of the function at the asymptote
          m, v = self.model.predict(projected_candidates)
  
          ucb_values = m + self.delta * np.sqrt(v)
          print(ucb_values)
          # Sample a configuration based on the ucb values
          p = np.ones(self.n_candidates) * (
              ucb_values / np.sum(ucb_values)
          )
          idx = np.random.choice(self.n_candidates, 1, False, p)
  
          c = candidates[idx][0]
  
      config = ConfigSpace.Configuration(self.config_space, vector=c)
  
      self.lock.release()
      return config.get_dictionary(), {}
  
file_path: HpBandSter/hpbandster/optimizers/config_generators/lcnet.py
imports: import ConfigSpace
  import numpy
  import threading
  from robo.models.lcnet import LCNet, get_lc_net
  from hpbandster.core.base_config_generator import base_config_generator
label_desc: Use image node_id 2 for calling the LCNetWrapper obj's underlying member method code with example usage: obj.get_config(budget) and returns: config,  dict