File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -298,6 +298,9 @@ def on_run_end(self) -> None:
298298 if self ._num_ready_batches_reached ():
299299 self .update_lr_schedulers ("epoch" , update_plateau_schedulers = True )
300300
301+ # FIXME: where should this go...
302+ # self.batch_progress.current.reset()
303+
301304 # if fault tolerant is enabled and process has been notified, exit.
302305 self .trainer ._exit_gracefully_on_signal ()
303306
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ class FitLoop(Loop):
3636
3737 def __init__ (
3838 self ,
39- min_epochs : Optional [int ] = 1 ,
39+ min_epochs : Optional [int ] = 0 ,
4040 max_epochs : int = 1000 ,
4141 ) -> None :
4242 super ().__init__ ()
@@ -239,7 +239,9 @@ def advance(self) -> None:
239239 self .global_step += 1
240240
241241 def on_advance_end (self ) -> None :
242- self .epoch_progress .increment_completed ()
242+ # TODO(@carmocca): remove this check after implementing `loop.stop()`
243+ if not self .trainer .should_stop :
244+ self .epoch_progress .increment_completed ()
243245
244246 def on_run_end (self ) -> None :
245247 """Calls the ``on_train_end`` hook."""
Original file line number Diff line number Diff line change @@ -321,7 +321,7 @@ def __init__(
321321 To enable infinite training, set ``max_epochs = -1``.
322322
323323 min_epochs: Force training for at least these many epochs. Disabled by default (None).
324- If both min_epochs and min_steps are not specified, defaults to ``min_epochs = 1 ``.
324+ If both min_epochs and min_steps are not specified, defaults to ``min_epochs = 0 ``.
325325
326326 max_steps: Stop training after this number of steps. Disabled by default (-1). If ``max_steps = -1``
327327 and ``max_epochs = None``, will default to ``max_epochs = 1000``. To enable infinite training, set
@@ -447,7 +447,7 @@ def __init__(
447447 self .tuner = Tuner (self )
448448
449449 fit_loop = FitLoop (
450- min_epochs = (1 if (min_epochs is None and min_steps is None and max_time is None ) else min_epochs ),
450+ min_epochs = (0 if (min_epochs is None and min_steps is None and max_time is None ) else min_epochs ),
451451 max_epochs = (
452452 max_epochs if max_epochs is not None else (1000 if (max_steps == - 1 and max_time is None ) else - 1 )
453453 ),
You can’t perform that action at this time.
0 commit comments