Fix trainer callback (#7720)
Fix a bug that happends when subclassing Trainer and overwriting evaluate() without calling prediciton_loop()
This commit is contained in:
@@ -443,6 +443,7 @@ class ProgressCallback(TrainerCallback):
|
|||||||
|
|
||||||
def on_evaluate(self, args, state, control, **kwargs):
|
def on_evaluate(self, args, state, control, **kwargs):
|
||||||
if state.is_local_process_zero:
|
if state.is_local_process_zero:
|
||||||
|
if self.prediction_bar is not None:
|
||||||
self.prediction_bar.close()
|
self.prediction_bar.close()
|
||||||
self.prediction_bar = None
|
self.prediction_bar = None
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user