Update trainer.py (#3834)

This commit is contained in:
ananthsub 2020-10-03 19:18:05 -07:00 committed by GitHub
parent 66aef10239
commit b8a6408a11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -283,6 +283,9 @@ class Trainer(
self.shown_warnings = set()
# init callbacks
# Declare attributes to be set in callback_connector on_trainer_init
self.checkpoint_callback: Union[ModelCheckpoint, bool] = checkpoint_callback
self.early_stop_callback: Optional[Union[EarlyStopping, bool]] = early_stop_callback
self.callback_connector.on_trainer_init(
callbacks,
early_stop_callback,