Flash Trainer not working - No module named 'pytorch_lightning.utilities.apply_func'
da-veed opened this issue ยท 1 comments
da-veed commented
๐ Bug
Traceback (most recent call last):
File "path-to-code/components/train/train.py", line 7, in <module>
from flash import Trainer
File "/home/drc/anaconda3/envs/work-env/lib/python3.10/site-packages/flash/__init__.py", line 22, in <module>
from flash.core.data.callback import FlashCallback
File "/home/drc/anaconda3/envs/work-env/lib/python3.10/site-packages/flash/core/data/callback.py", line 8, in <module>
from flash.core.data.utils import _STAGES_PREFIX
File "/home/drc/anaconda3/envs/work-env/lib/python3.10/site-packages/flash/core/data/utils.py", line 22, in <module>
from pytorch_lightning.utilities.apply_func import apply_to_collection
ModuleNotFoundError: No module named 'pytorch_lightning.utilities.apply_func'
To Reproduce
Run in terminal: pip install lightning-flash
In a python script: from flash import Trainer
Expected behavior
Trainer import successful :)
Environment
- OS: Ubuntu 20.04
- Python version: 3.10
- PyTorch/Lightning/Flash Version (e.g., 1.10/1.5/0.7): torch - 2.0.0+cpu, lightning - 2.0.2, lightning-flash - 0.8.1.post0
- GPU models and configuration: no GPU