mirror of
https://github.com/huggingface/transformers.git
synced 2025-08-03 03:31:05 +06:00
Add simple one character fix so that on_step_begin and on_step_end are called at the right times (#10839)
This commit is contained in:
parent
24ab5b08a3
commit
b230181d41
@ -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 (
|
||||
|
Loading…
Reference in New Issue
Block a user