Closed Paulda07 closed 1 year ago
hey @Paulda07, mind trying out the recent bolts release? this was fixed recently.
Hi, @Paulda07, your bolts version is 0.3.2, which is quite old at this point. If you update to a recent version, you should be good to go for your midterm :zap:
This issue has been automatically marked as stale because it hasn't had any recent activity. This issue will be closed in 7 days if no further activity occurs. Thank you for your contributions - the Lightning Team!
Bug description
When I try to import the Logistic Regression model from pl_bolt.models I get this error.
My code (in collab):
!pip install pytorch-lightning-bolts from pl_bolts.models.regression import LogisticRegression
The error:
ImportError Traceback (most recent call last) in
----> 1 from pl_bolts.models import LogisticRegression
3 frames /usr/local/lib/python3.7/dist-packages/pl_bolts/utils/init.py in
1 import torch
----> 2 from pytorch_lightning.utilities import _module_available
3
4 from pl_bolts.callbacks.verification.batch_gradient import BatchGradientVerification # type: ignore
5
ImportError: cannot import name '_module_available' from 'pytorch_lightning.utilities' (/usr/local/lib/python3.7/dist-packages/pytorch_lightning/utilities/init.py)
How to reproduce the bug
Error messages and logs
ImportError Traceback (most recent call last) in
----> 1 from pl_bolts.models import LogisticRegression
3 frames /usr/local/lib/python3.7/dist-packages/pl_bolts/utils/init.py in
1 import torch
----> 2 from pytorch_lightning.utilities import _module_available
3
4 from pl_bolts.callbacks.verification.batch_gradient import BatchGradientVerification # type: ignore
5
ImportError: cannot import name '_module_available' from 'pytorch_lightning.utilities' (/usr/local/lib/python3.7/dist-packages/pytorch_lightning/utilities/init.py)
Environment
More info
My first bug contribution, hehe. Hope some coding genius looks into this. I'll use an implementation from torch.nn.Module for my midterm due tomorrow. :)