How to load a released PL model in my directory?
Hello! I’m new to PyTorch Lightning. Recently, I am developing a PyTorch project. I want to run an open-source DeepSpeech code in Github and load its checkpoint. I clone their repository and run successfully. Then, I want to add their model to my project.
In PyTorch, this is easy. I only need to copy their model definition files and checkpoint files to my project directory. However, when I did these, I received an error when I ran load_from_checkpoint.

ModuleNotFoundError: No module named deepspeech_pytorch

Then, I try to directly call torch.load('librispeech_pretrained_v3.ckpt'). The error is still raised.
Thus, I was wondering if I can load their model in my own directory without copying their whole repository?
I assume you are talking about this one, right?
https://github.com/SeanNaren/deepspeech.pytorch
Maybe you are getting

ModuleNotFoundError: No module named deepspeech_pytorch

because you didn't install that module into your environment. Follow the instructions on the README page of the repository to install the package, i.e., pip install -e . in the cloned repo folder.
Then in your other projects you can import the deepspeech_pytorch module given that you active the same virtual environment. An so loading a model checkpoint should be able to import that too under the same conditions.
Hope that helps