Skip to content

Commit

Permalink
run make fixup and fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrobrs committed Aug 22, 2024
1 parent 88338e4 commit 63552fa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/transformers/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2961,8 +2961,9 @@ def _save_checkpoint(self, model, trial, metrics=None):
# Save the Trainer state
if self.args.should_save:
# Update `ExportableState` callbacks and `TrainerControl` state to where we are currently
for cb in [cb for cb in self.callback_handler.callbacks + [self.control] if
isinstance(cb, ExportableState)]:
for cb in [
cb for cb in self.callback_handler.callbacks + [self.control] if isinstance(cb, ExportableState)
]:
self.state.stateful_callbacks[cb.__class__.__name__] = cb.state()
self.state.save_to_json(os.path.join(output_dir, TRAINER_STATE_NAME))

Expand Down

0 comments on commit 63552fa

Please sign in to comment.