This commit is contained in:
hiyouga 2024-05-12 01:25:16 +08:00
parent 58c522cd5c
commit 4777efe517
1 changed files with 4 additions and 2 deletions

View File

@ -139,12 +139,14 @@ class LogCallback(TrainerCallback):
r"""
Event called after an evaluation phase.
"""
if not self.do_train:
self._close_thread_pool()
def on_predict(self, args: "TrainingArguments", state: "TrainerState", control: "TrainerControl", **kwargs):
r"""
Event called after a successful prediction.
"""
if not self.do_train:
self._close_thread_pool()
def on_log(self, args: "TrainingArguments", state: "TrainerState", control: "TrainerControl", **kwargs):