class_docstr: Tower Generator base class for Phoenix.
class_docstr_tok: ["Tower","Generator","base","class","for","Phoenix","."]
docstr: Saves architecture in a text file.
docstr_tok: ["Saves","architecture","in","a","text","file","."]
code: def _save_architecture(self, architecture, model_dir, trial_id):
      """Saves architecture in a text file."""
      if not tf.io.gfile.exists(model_dir):
          tf.io.gfile.makedirs(model_dir)
      filename = os.path.join(model_dir, "{}.arch.txt".format(trial_id))
      with tf.io.gfile.GFile(filename, "w") as f:
          for item in map(str, architecture.tolist()):
              f.write("{}\n".format(item))
  
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 4 for calling the BaseTowerGenerator obj's underlying member method code with example usage: obj._save_architecture(architecture, model_dir, trial_id) without return types