class_docstr: Tower Generator base class for Phoenix.
class_docstr_tok: ["Tower","Generator","base","class","for","Phoenix","."]
docstr: Creates the tower(s).
  
  This function runs on the chief and runs only once!
  
  You can create the Phoenix tower. You can use randomness in creating the
  tower, and this class will take care of everything for you (take care that
  the workers have the same graph as chief even in the presence of randomness
  and that if premepteed, the chief will recover the same graph.
  
  Limitations for implementing this function and using this class:
  The towers must be a Phoenix towers. Meaning, they need to be constructed
  with architectural_utils.construct_tower
  
  Additionally, tower names must follow the following naming convention:
  `generator_name`_1, `generator_name`_2, etc.
  
  The above is needed for _build_from_existing_checkpoint.
  
  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: The last axis dimension of the logits.
    hparams: hp.HParams with the hyperparameters.
    run_config: tf.RunConfig instance.
    is_training: a boolean specifying if we are training.
    trials: a list of `Trial` objects (metadata.trial.Trial).
  
  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: ["Creates","the","tower","(","s",")",".","This","function","runs","on","the","chief","and","runs","only","once","!","You","can","create","the","Phoenix","tower",".","You","can","use","randomness","in","creating","the","tower",",","and","this","class","will","take","care","of","everything","for","you","(","take","care","that","the","workers","have","the","same","graph","as","chief","even","in","the","presence","of","randomness","and","that","if","premepteed",",","the","chief","will","recover","the","same","graph",".","Limitations","for","implementing","this","function","and","using","this","class",":","The","towers","must","be","a","Phoenix","towers",".","Meaning",",","they","need","to","be","constructed","with","architectural_utils.construct_tower","Additionally",",","tower","names","must","follow","the","following","naming","convention",":","`","generator_name","`","_1",",","`","generator_name","`","_2",",","etc",".","The","above","is","needed","for","_build_from_existing_checkpoint",".","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",":","The","last","axis","dimension","of","the","logits",".","hparams",":","hp.HParams","with","the","hyperparameters",".","run_config",":","tf.RunConfig","instance",".","is_training",":","a","boolean","specifying","if","we","are","training",".","trials",":","a","list","of","`","Trial","`","objects","(","metadata.trial.Trial",")",".","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 first_time_chief_generate(
      self,
      input_layer_fn,
      trial_mode,
      logits_dimension,
      hparams,
      run_config,
      is_training,
      trials,
  ):
      """Creates the tower(s).
  
      This function runs on the chief and runs only once!
  
      You can create the Phoenix tower. You can use randomness in creating the
      tower, and this class will take care of everything for you (take care that
      the workers have the same graph as chief even in the presence of randomness
      and that if premepteed, the chief will recover the same graph.
  
      Limitations for implementing this function and using this class:
      The towers must be a Phoenix towers. Meaning, they need to be constructed
      with architectural_utils.construct_tower
  
      Additionally, tower names must follow the following naming convention:
      `generator_name`_1, `generator_name`_2, etc.
  
      The above is needed for _build_from_existing_checkpoint.
  
      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: The last axis dimension of the logits.
        hparams: hp.HParams with the hyperparameters.
        run_config: tf.RunConfig instance.
        is_training: a boolean specifying if we are training.
        trials: a list of `Trial` objects (metadata.trial.Trial).
  
      Returns:
        A list of LogitsSpec, and a list of architectures (I.e., one LogitsSpec
        and one architecture per tower that the generator creates).
      """
  
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 6 for calling the BaseTowerGenerator obj's underlying member method code with example usage: obj.first_time_chief_generate(input_layer_fn, trial_mode, logits_dimension, hparams, run_config, is_training, trials) without return types