The slides seem wrong. The slides are inconsistent with the API document about the Callback class.
In the slides:
from pytorch_lightning.callbacks import Callback
Class MyCustomCallback(Callback):
...
In the "Callback API" document:
Class MyCustomCallback(lightning.Callback):
...
I defined MyCustomCallback class for exercise 2 and it give me runtime error at trainer = L.Trainer(...
When I used lightning.Callback, it works.
The slides seem wrong. The slides are inconsistent with the API document about the Callback class. In the slides: from pytorch_lightning.callbacks import Callback Class MyCustomCallback(Callback): ... In the "Callback API" document: Class MyCustomCallback(lightning.Callback): ... I defined MyCustomCallback class for exercise 2 and it give me runtime error at trainer = L.Trainer(... When I used lightning.Callback, it works.