679a897a5974c59c4b09361c6e9974e0096533d2,open_seq2seq/utils/funcs.py,,train,#Any#Any#Any#,14

Before Change


    stop_grace_period_secs=300,
    hooks=hooks,
  ) as sess:
    for step, feed_dict in enumerate(train_model.data_layer.iterate_forever()):
      if sess.should_stop():
        break
      tm = time.time()
      sess.run(fetches=train_model.train_op, feed_dict=feed_dict)
      if step >= bench_start:
        total_time += time.time() - tm

  if hvd is not None:
    deco_print("Finished training on rank {}".format(hvd.rank()))
  else:
    deco_print("Finished training")

After Change


      sess.run(train_model.get_data_layer().iterator.initializer)
    else:
      for i in range(train_model.num_gpus):
        sess.run(train_model.get_data_layer(i).iterator.initializer)
    step = 0
    while True:
      if sess.should_stop():
        break
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


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


Project Name: NVIDIA/OpenSeq2Seq
Commit Name: 80373cedf76f85b47de78080712f508a46c5345c
Time: 2018-05-16
Author: okuchaiev@nvidia.com
File Name: open_seq2seq/models/text2text_test.py
Class Name: BasicText2TextWithAttentionTestOnHorovod
Method Name: test_train


Project Name: NVIDIA/OpenSeq2Seq
Commit Name: 80373cedf76f85b47de78080712f508a46c5345c
Time: 2018-05-16
Author: okuchaiev@nvidia.com
File Name: open_seq2seq/models/text2text_test.py
Class Name: BasicText2TextWithAttentionTest
Method Name: test_train