Skip to content

Commit

Permalink
Use valid_world's batchsize in run_eval() (facebookresearch#1216)
Browse files Browse the repository at this point in the history
  • Loading branch information
bhancock8 authored and alexholdenmiller committed Oct 12, 2018
1 parent c6234f4 commit da56c71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion parlai/scripts/train_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def run_eval(agent, opt, datatype, max_exs=-1, write_log=False, valid_world=None
if cnt == 0 and opt['display_examples']:
print(valid_world.display() + '\n~~')
print(valid_world.report())
cnt += opt['batchsize']
cnt += valid_world.opt['batchsize']
if max_exs > 0 and cnt > max_exs + opt.get('numthreads', 1):
# note this max_exs is approximate--some batches won't always be
# full depending on the structure of the data
Expand Down

0 comments on commit da56c71

Please sign in to comment.