)
```
Another way to register a callback is to call trainer.add_callback() as follows:
```python
trainer = Trainer(...)
trainer.add_callback(MyCallback)
Alternatively, we can pass an instance of the callback class
trainer.add_callback(MyCallback())
```
TrainerState
[[autodoc]] TrainerState
TrainerControl
[[autodoc]] TrainerControl
