Skip to content

Commit

Permalink
fix trainer
Browse files Browse the repository at this point in the history
  • Loading branch information
echarlaix committed Nov 3, 2023
1 parent deff847 commit 0ad7dc2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions optimum/intel/openvino/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,9 @@ def _inner_training_loop(
if model is not self.model:
self.model_wrapped = model

if delay_optimizer_creation:
self.create_optimizer_and_scheduler(num_training_steps=max_steps)

# Check if saved optimizer or scheduler states exist
self._load_optimizer_and_scheduler(resume_from_checkpoint)

Expand Down

0 comments on commit 0ad7dc2

Please sign in to comment.