class_docstr: Generates prior towers for Phoenix.
class_docstr_tok: ["Generates","prior","towers","for","Phoenix","."]
code: def build_priors_adaptively(
      self, is_training, trials, logits_dimension, my_id, my_model_dir
  ):
      increase_every = (
          self._ensemble_spec.adaptive_search.increase_width_every
      )
  
      pool_size = my_id // increase_every * increase_every
      best_trial = self._get_best_trials(
          trials, pool_size, num_trials_to_consider=1
      )
  
      if not best_trial:
          architecture_utils.set_number_of_towers(
              self.generator_name(), 0
          )
          return []
  
      # TODO(b/172564129): In the adaptive case, if distillation happens before
      # ensembling, Phoenix will import both the teacher and the student and wire
      # them together. Ideally, we should only be importing the student. (This is
      # only an issue in the adaptive case since we call _import_towers_one_trial
      # which imports both the priors and the search tower, instead of just the
      # search tower).
      return trial_utils.import_towers_one_trial(
          phoenix_spec=self._phoenix_spec,
          is_training=is_training,
          logits_dimension=logits_dimension,
          prev_model_dir=architecture_utils.DirectoryHandler.trial_dir(
              best_trial
          ),
          force_freeze=self._force_freeze,
          allow_auxiliary_head=self._allow_auxiliary_head,
          caller_generator=self.generator_name(),
          my_model_dir=my_model_dir,
      )
  
file_path: model_search/model_search/generators/prior_generator.py
imports: import random
  from model_search.architecture import architecture_utils
  from model_search.generators import base_tower_generator
  from model_search.generators import trial_utils
  import tensorflow.compat.v2
label_desc: Use image node_id 7 for calling the PriorGenerator obj's underlying member method code with example usage: obj.build_priors_adaptively(is_training, trials, logits_dimension, my_id, my_model_dir) and returns: trial_utils, list