remove on_perf check hooks (#3178)

This commit is contained in:
William Falcon 2020-08-25 22:57:23 -04:00 committed by GitHub
parent 2f6d82e0e6
commit c84060bcf3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 18 deletions

View File

@ -250,18 +250,6 @@ class ModelHooks(Module):
"""
# do something when the epoch ends
def on_pre_performance_check(self) -> None:
"""
Called at the very beginning of the validation loop.
"""
# do something before validation starts
def on_post_performance_check(self) -> None:
"""
Called at the very end of the validation loop.
"""
# do something before validation end
def on_before_zero_grad(self, optimizer: Optimizer) -> None:
"""
Called after optimizer.step() and before optimizer.zero_grad().

View File

@ -312,9 +312,6 @@ class TrainerEvaluationLoopMixin(ABC):
# enable eval mode + no grads
model = self.get_model()
# TODO: deprecate
model.on_pre_performance_check()
# select dataloaders
dataloaders, max_batches = self.evaluation_loop.get_evaluation_dataloaders()
@ -389,9 +386,6 @@ class TrainerEvaluationLoopMixin(ABC):
# log the final eval loop metrics
eval_loop_results = self.__log_evaluation_epoch_metrics(eval_results, test_mode)
# hook
model.on_post_performance_check()
# user may want to reload every epoch
if self.reload_dataloaders_every_epoch:
self.evaluation_loop.reload_evaluation_dataloaders()