Update Custom Callback Docs (#17161)
Co-authored-by: Jirka Borovec <6035284+Borda@users.noreply.github.com>
This commit is contained in:
parent
e7ef8db57e
commit
27c1faaf8d
|
@ -22,9 +22,9 @@ the following example.
|
|||
self.state = {"epochs": 0, "batches": 0}
|
||||
|
||||
@property
|
||||
def state_key(self):
|
||||
def state_key(self) -> str:
|
||||
# note: we do not include `verbose` here on purpose
|
||||
return self._generate_state_key(what=self.what)
|
||||
return f"Counter[what={self.what}]"
|
||||
|
||||
def on_train_epoch_end(self, *args, **kwargs):
|
||||
if self.what == "epochs":
|
||||
|
|
Loading…
Reference in New Issue