1ec383c8988d15b6c47c9565c8e3935574c14f86,official/nlp/bert/run_squad.py,,main,#Any#,77

Before Change


        custom_callbacks=custom_callbacks,
        run_eagerly=FLAGS.run_eagerly,
    )
  if FLAGS.mode in ("predict", "train_and_predict"):
    predict_squad(strategy, input_meta_data)

After Change


        summary_dir = os.path.join(FLAGS.model_dir, "summaries")
      else:
        summary_dir = tempfile.mkdtemp()
      summary_writer = tf.summary.create_file_writer(
          os.path.join(summary_dir, "eval"))
      with summary_writer.as_default():
        // TODO(lehou): write to the correct step number.
        tf.summary.scalar("F1-score", f1_score, step=0)
        summary_writer.flush()


if __name__ == "__main__":
  flags.mark_flag_as_required("bert_config_file")
  flags.mark_flag_as_required("model_dir")
  app.run(main)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: tensorflow/models
Commit Name: 1ec383c8988d15b6c47c9565c8e3935574c14f86
Time: 2020-03-23
Author: gardener@tensorflow.org
File Name: official/nlp/bert/run_squad.py
Class Name:
Method Name: main


Project Name: tensorflow/models
Commit Name: ad34b621b0fdecc323473bf7e4367c13f1ab1c4d
Time: 2020-03-30
Author: gardener@tensorflow.org
File Name: official/nlp/albert/run_squad.py
Class Name:
Method Name: main


Project Name: tensorflow/tpu
Commit Name: 193c2dffbf492f832d2914d16b12f7ba8afc3979
Time: 2019-12-03
Author: gardener@tensorflow.org
File Name: models/official/mnasnet/mnasnet_main.py
Class Name:
Method Name: build_model_fn