roatienza / efficientspeech

PyTorch code implementation of EfficientSpeech - to be presented at ICASSP2023.
Apache License 2.0
153 stars 26 forks source link

[fix] Call `load_from_checkpoint` as class method for newer lightning versions #11

Open gudgud96 opened 7 months ago

gudgud96 commented 7 months ago

The following error is thrown in the original code using later versions of Lightning (e.g. 2.2.1):

TypeError: The classmethod `EfficientSpeech.load_from_checkpoint` cannot be called on an instance. Please call it on the class type and make sure the return value is used.

Fix by changing the code to call load_from_checkpoint using class method (see https://github.com/Lightning-AI/pytorch-lightning/issues/18169).