diff --git a/examples/fabric/build_your_own_trainer/trainer.py b/examples/fabric/build_your_own_trainer/trainer.py index 492245e699..08692377d8 100644 --- a/examples/fabric/build_your_own_trainer/trainer.py +++ b/examples/fabric/build_your_own_trainer/trainer.py @@ -216,8 +216,7 @@ class MyCustomTrainer: for batch_idx, batch in enumerate(iterable): # end epoch if stopping training completely or max batches for this epoch reached if self.should_stop or batch_idx >= limit_batches: - self.fabric.call("on_train_epoch_end") - return + break self.fabric.call("on_train_batch_start", batch, batch_idx)