Unverified Commit b230181d authored by Sidd Karamcheti's avatar Sidd Karamcheti Committed by GitHub
Browse files

Add simple one character fix so that on_step_begin and on_step_end are called...

Add simple one character fix so that on_step_begin and on_step_end are called at the right times (#10839)
parent 24ab5b08
......@@ -1067,7 +1067,7 @@ class Trainer:
steps_trained_in_current_epoch -= 1
continue
if (step + 1) % self.args.gradient_accumulation_steps == 0:
if step % self.args.gradient_accumulation_steps == 0:
self.control = self.callback_handler.on_step_begin(self.args, self.state, self.control)
if (
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment