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

Cant run example models in colab due to lightning error #448

Open
neramas1221 opened this issue Nov 2, 2022 · 4 comments
Open

Cant run example models in colab due to lightning error #448

neramas1221 opened this issue Nov 2, 2022 · 4 comments

Comments

@neramas1221
Copy link

Hi, I've tried a few of the notebooks you provided for the examples but I run in to the same error across all of them in colab with the following error:

ImportError                               Traceback (most recent call last)
[<ipython-input-6-548ac97a7512>](https://localhost:8080/#) in <module>
     15 # dalle classes
     16 
---> 17 from dalle_pytorch import DiscreteVAE
     18 
     19 # constants

4 frames
[/usr/local/lib/python3.7/dist-packages/taming/main.py](https://localhost:8080/#) in <module>
     10 from pytorch_lightning.trainer import Trainer
     11 from pytorch_lightning.callbacks import ModelCheckpoint, Callback, LearningRateMonitor
---> 12 from pytorch_lightning.utilities.distributed import rank_zero_only
     13 
     14 def get_obj_from_str(string, reload=False):

ImportError: cannot import name 'rank_zero_only' from 'pytorch_lightning.utilities.distributed' (/usr/local/lib/python3.7/dist-packages/pytorch_lightning/utilities/distributed.py)

I think the version of lightning that is installed by the script might be incorrect now?

Any help getting this fixed is greatly appreciated!

Thanks

@iamnmn9
Copy link

iamnmn9 commented Jun 22, 2023

Any solution?

@ashutoshbagga
Copy link

Any solution to this?

@varshasrinivasan95
Copy link

any solution to this? facing the same in conda 3.9.7 and python3 (3.11.5) as well.

@vaikzs
Copy link

vaikzs commented Sep 25, 2023

I got this to work by manually installing pytorch-lightning==1.9.0 instead of >2.0.0 (rank_zero_only is deprecated).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants