3a414b1013ef6e82a0314ad89737c538e8902fa2,open_seq2seq/utils/funcs.py,,train,#Any#Any#Any#,16

Before Change


    deco_print("Finished training")

  if train_model.on_horovod:
    ending = " on worker {}".format(hvd.rank())
  else:
    ending = ""
  if step > bench_start:

After Change


  if len(fetches) > 1:
    total_objects = collect_if_horovod(total_objects, hvd, mode="sum")

  if master_worker:
    deco_print("Finished training")
    if step > bench_start:
      avg_time = 1.0 * total_time / (step - bench_start)
      deco_print("Avg time per step: {:.3f}s".format(avg_time))
      if len(fetches) > 1:
        avg_objects = 1.0 * total_objects / total_time
        deco_print("Avg objects per second: {:.3f}".format(avg_objects))
    else:
      deco_print("Not enough steps for benchmarking")


def restore_and_get_results(model, checkpoint, mode):
  saver = tf.train.Saver()
  sess_config = tf.ConfigProto(allow_soft_placement=True)
  sess_config.gpu_options.allow_growth = True
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 4

Instances


Project Name: NVIDIA/OpenSeq2Seq
Commit Name: 3a414b1013ef6e82a0314ad89737c538e8902fa2
Time: 2018-05-29
Author: igor.a.gitman@gmail.com
File Name: open_seq2seq/utils/funcs.py
Class Name:
Method Name: train


Project Name: horovod/horovod
Commit Name: f3af98649a26f4f3725fcab6a9bd3e8d29d7ffd2
Time: 2021-02-18
Author: git@maxgerlach.de
File Name: test/parallel/test_tensorflow.py
Class Name: TensorFlowTests
Method Name: test_horovod_alltoall_zero_splits_gpu


Project Name: datascienceinc/Skater
Commit Name: 5601c4bb909b4146327fa68c6d5b668f997baaff
Time: 2017-03-21
Author: aikramer2@gmail.com
File Name: pyinterpret/data/dataset.py
Class Name: DataSet
Method Name: _build_metastore


Project Name: horovod/horovod
Commit Name: f3af98649a26f4f3725fcab6a9bd3e8d29d7ffd2
Time: 2021-02-18
Author: git@maxgerlach.de
File Name: test/parallel/test_tensorflow.py
Class Name: TensorFlowTests
Method Name: test_horovod_alltoall_zero_splits_cpu


Project Name: NVIDIA/OpenSeq2Seq
Commit Name: dd391aab5ceff73a674a45325e21cc5c76dfad69
Time: 2018-06-20
Author: xravitejax@gmail.com
File Name: open_seq2seq/parts/cnns/conv_blocks.py
Class Name:
Method Name: conv_bn_actv