Skip to content

Commit

Permalink
also report sentence/s timing when generating (#284)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeib committed May 17, 2018
1 parent 5cd9c21 commit c903798
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ def main(args):
t.log({'wps': round(wps_meter.avg)})
num_sentences += 1

print('| Translated {} sentences ({} tokens) in {:.1f}s ({:.2f} tokens/s)'.format(
num_sentences, gen_timer.n, gen_timer.sum, 1. / gen_timer.avg))
print('| Translated {} sentences ({} tokens) in {:.1f}s ({:.2f} sentences/s, {:.2f} tokens/s)'.format(
num_sentences, gen_timer.n, gen_timer.sum, num_sentences/ gen_timer.sum, 1. / gen_timer.avg))
if has_target:
print('| Generate {} with beam={}: {}'.format(args.gen_subset, args.beam, scorer.result_string()))

Expand Down

0 comments on commit c903798

Please sign in to comment.