(operative_config_dir)
Record operative Gin configurations in the given directory.
Record operative Gin configurations in the given directory.
Record operative Gin configurations in the given directory .
def record_operative_gin_configurations(operative_config_dir):
  """Record operative Gin configurations in the given directory."""
  gin_log_file = operative_config_path(operative_config_dir)
  # If it exists already, rename it instead of overwriting it.
  # This just saves the previous one, not all the ones before.
  if tf.io.gfile.exists(gin_log_file):
    tf.io.gfile.rename(gin_log_file, gin_log_file + '.old', overwrite=True)
  with tf.io.gfile.GFile(gin_log_file, 'w') as f:
    f.write(gin.operative_config_str())
def record_operative_gin_configurations ( operative_config_dir ) : gin_log_file = operative_config_path ( operative_config_dir ) # If it exists already, rename it instead of overwriting it. # This just saves the previous one, not all the ones before. if tf . io . gfile . exists ( gin_log_file ) : tf . io . gfile . rename ( gin_log_file , gin_log_file + '.old' , overwrite = True ) with tf . io . gfile . GFile ( gin_log_file , 'w' ) as f : f . write ( gin . operative_config_str ( ) )