Make predict() close progress bars after finishing (#17952) (#18078)

* Make Trainer.predict call on_evaluate (#17952)

* Add on_predict

* Small fix

* Small and different fix

* Add tests
This commit is contained in:
neverix
2022-07-08 23:44:24 +03:00
committed by GitHub
parent 7c046c5c22
commit 8b332a6a16
4 changed files with 24 additions and 0 deletions

View File

@@ -66,6 +66,9 @@ class MyTestTrainerCallback(TrainerCallback):
def on_evaluate(self, args, state, control, **kwargs):
self.events.append("on_evaluate")
def on_predict(self, args, state, control, **kwargs):
self.events.append("on_predict")
def on_save(self, args, state, control, **kwargs):
self.events.append("on_save")