class_docstr: Tower Generator base class for Phoenix.
class_docstr_tok: ["Tower","Generator","base","class","for","Phoenix","."]
docstr: Generates the next architecture to try.
  
  Args:
    input_layer_fn: A function that converts feature Tensors to input layer.
      See learning.autolx.model_search.data.Provider.get_input_layer_fn
      for details.
    trial_mode: the TrialMode for the current Phoenix trial.
    logits_dimension: An int holding the dimension of the logits (number of
      classes for the multi class problem).
    hparams: the hyperparameters as given from oracle.
    run_config: A tf.estimator.RunConfig instance for the training process.
    is_training: a boolean indicating if we are in training.
    trials: list of `Trial`, with all information we have so far (to be passed
      to the smart search algorithm).
  
  Returns:
    A list of LogitsSpec, and a list of architectures (I.e., one LogitsSpec
    and one architecture per tower that the generator creates).
docstr_tok: ["Generates","the","next","architecture","to","try",".","Args",":","input_layer_fn",":","A","function","that","converts","feature","Tensors","to","input","layer",".","See","learning.autolx.model_search.data.Provider.get_input_layer_fn","for","details",".","trial_mode",":","the","TrialMode","for","the","current","Phoenix","trial",".","logits_dimension",":","An","int","holding","the","dimension","of","the","logits","(","number","of","classes","for","the","multi","class","problem",")",".","hparams",":","the","hyperparameters","as","given","from","oracle",".","run_config",":","A","tf.estimator.RunConfig","instance","for","the","training","process",".","is_training",":","a","boolean","indicating","if","we","are","in","training",".","trials",":","list","of","`","Trial","`",",","with","all","information","we","have","so","far","(","to","be","passed","to","the","smart","search","algorithm",")",".","Returns",":","A","list","of","LogitsSpec",",","and","a","list","of","architectures","(","I.e.",",","one","LogitsSpec","and","one","architecture","per","tower","that","the","generator","creates",")","."]
code: def generate(
      self,
      input_layer_fn,
      trial_mode,
      logits_dimension,
      hparams,
      run_config,
      is_training,
      trials,
  ) -> List[tower.Tower]:
      """Generates the next architecture to try.
  
      Args:
        input_layer_fn: A function that converts feature Tensors to input layer.
          See learning.autolx.model_search.data.Provider.get_input_layer_fn
          for details.
        trial_mode: the TrialMode for the current Phoenix trial.
        logits_dimension: An int holding the dimension of the logits (number of
          classes for the multi class problem).
        hparams: the hyperparameters as given from oracle.
        run_config: A tf.estimator.RunConfig instance for the training process.
        is_training: a boolean indicating if we are in training.
        trials: list of `Trial`, with all information we have so far (to be passed
          to the smart search algorithm).
  
      Returns:
        A list of LogitsSpec, and a list of architectures (I.e., one LogitsSpec
        and one architecture per tower that the generator creates).
      """
      if not run_config.is_chief:
          self._wait_for_chief(run_config.model_dir)
  
      if tf.train.latest_checkpoint(run_config.model_dir):
          return self._build_from_existing_checkpoint(
              model_dir=run_config.model_dir,
              trial_mode=trial_mode,
              logits_dimension=logits_dimension,
              is_training=is_training,
          )
  
      return self.first_time_chief_generate(
          input_layer_fn=input_layer_fn,
          trial_mode=trial_mode,
          logits_dimension=logits_dimension,
          hparams=hparams,
          run_config=run_config,
          is_training=is_training,
          trials=trials,
      )
  
file_path: model_search/model_search/generators/base_tower_generator.py
imports: import abc
  import os
  import time
  from typing import List
  from absl import logging
  from model_search.architecture import architecture_utils
  from model_search.architecture import tower
  import tensorflow.compat.v2
label_desc: Use image node_id 7 for calling the BaseTowerGenerator obj's underlying member method code with example usage: obj.generate(input_layer_fn, trial_mode, logits_dimension, hparams, run_config, is_training, trials) and returns: self, self