Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

valueError: trainer constructor argument must be either None or pytorch_lightning.Trainer. But got <class 'lightning.pytorch.trainer.trainer.Trainer'> instead. #11458

Open
kabyanil opened this issue Dec 3, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@kabyanil
Copy link

kabyanil commented Dec 3, 2024

Describe the bug

I was following the tutorials provided in /tutorials/asr directory. In the Training with PyTorch Lightning section of ASR_with_NeMo.ipynb, when I run the second code block, I get the following error -

valueError: trainer constructor argument must be either None or pytorch_lightning.Trainer. But got <class 'lightning.pytorch.trainer.trainer.Trainer'> instead.

This error can be solved by updating the pytorch lightning import to import pytorch_lightning as pl.

I am happy to open a PR to fix this if required!

Steps/Code to reproduce bug

The error can be reproduced by running the notebook ASR_with_NeMo.ipynb.

Expected behavior

The NeMo model should load from the config.

Environment overview (please complete the following information)

  • Environment location: Local
  • Method of NeMo install: Source

Environment details

  • OS version Ubuntu 22.04
  • PyTorch version 2.5.1
  • Python version 3.11
  • RTX 3060
@kabyanil kabyanil added the bug Something isn't working label Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant