Skip to content

Commit

Permalink
fix batch_size insistent in report (pytorch#7820)
Browse files Browse the repository at this point in the history
  • Loading branch information
zpcore authored Aug 12, 2024
1 parent 8f79488 commit f0bbaeb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions benchmarks/experiment_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,10 @@ def run_single_config(self):
reset_rng_state(experiment)
model = self.model_loader.load_model(model_config, experiment)

# real batch_size can be updated after load_model, need to update
# so the config can be reflected in the report.
experiment_config['batch_size'] = experiment.batch_size

# Repeat the experiment and accumulate metrics.
with model.pick_grad():
for repeat_iteration in range(self._args.repeat):
Expand Down

0 comments on commit f0bbaeb

Please sign in to comment.