Fix a bug for CallbackHandler.callback_list (#8052)

* Fix callback_list

* Add test

Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>

* Fix test

Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
This commit is contained in:
Harutaka Kawamura
2020-10-27 23:37:04 +09:00
committed by GitHub
parent 8e28c327fc
commit 7bff0af0a4
2 changed files with 8 additions and 1 deletions

View File

@@ -325,7 +325,7 @@ class CallbackHandler(TrainerCallback):
@property
def callback_list(self):
return "\n".join(self.callbacks)
return "\n".join(cb.__class__.__name__ for cb in self.callbacks)
def on_init_end(self, args: TrainingArguments, state: TrainerState, control: TrainerControl):
return self.call_event("on_init_end", args, state, control)