remove on_perf check hooks (#3178)
This commit is contained in:
parent
2f6d82e0e6
commit
c84060bcf3
|
@ -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().
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue