def is_training_done():
  """Checks if model training has completed."""
  # Existence of this file indicates that training is done.
  training_done_filename = os.path.join(FLAGS.model_dir, "TRAINING_DONE")
  return tf.gfile.Exists(training_done_filename)
Checks if model training has completed.
language/realm/refresh_doc_embeds.py