Fix trainer callback (#7720)

Fix a bug that happends when subclassing Trainer and
overwriting evaluate() without calling prediciton_loop()
This commit is contained in:
Jonathan Chang
2020-10-12 04:45:12 -07:00
committed by GitHub
parent f176e70723
commit 1d5ea34f6a

View File

@@ -443,6 +443,7 @@ class ProgressCallback(TrainerCallback):
def on_evaluate(self, args, state, control, **kwargs):
if state.is_local_process_zero:
if self.prediction_bar is not None:
self.prediction_bar.close()
self.prediction_bar = None