Closed lorinczszabolcs closed 1 year ago
@lorinczszabolcs would you be interested in debugging it further and eventually sending a fix? :flamingo:
I retried it now, and now a different error is given:
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
[<ipython-input-2-430f4efffa8e>](https://localhost:8080/#) in <cell line: 1>()
----> 1 import flash
2 from flash.core.data.utils import download_data
3 from flash.image import ObjectDetectionData, ObjectDetector
4
5 # 1. Create the DataModule
2 frames
[/usr/local/lib/python3.10/dist-packages/flash/core/data/utils.py](https://localhost:8080/#) in <module>
20 import requests
21 import urllib3
---> 22 from pytorch_lightning.utilities.apply_func import apply_to_collection
23 from torch import nn
24 from tqdm.auto import tqdm as tq
ModuleNotFoundError: No module named 'pytorch_lightning.utilities.apply_func'
Unfortunately I won't have the time to look into it in detail, but it still seems like it is some package version related issue (possibly caused by pytorch-lightning 2.0.0 (lightning 2.0.0) release.
possibly caused by pytorch-lightning 2.0.0 (lightning 2.0.0) release
Flash has pin dependency bellow 2.0
Upon installing with pip install lightning-flash
in a clean environment, it shows me that pytorch-lightning==2.0.2
gets installed. The following message is shown meanwhile: Collecting pytorch-lightning>=1.3.6 (from lightning-flash)
, indicating that the pinned dependency is >=1.3.6. even though I can see that is not the case here:
https://github.com/Lightning-Universe/lightning-flash/blob/14c27555e9cba706a2f20caeaf787c0e116ef1f4/requirements.txt#L8
Any idea why that's happening?
Upon installing with
pip install lightning-flash
in a clean environment, it shows me thatpytorch-lightning==2.0.2
most likely this pin adjustment was not yet released, so pls install ut from source for now:
pip install https://github.com/Lightning-Universe/lightning-flash/archive/refs/heads/master.zip
shall be fixed in https://github.com/Lightning-Universe/lightning-flash/releases/tag/0.8.2
🐛 Bug - Object detection example broken
The object detection example here is broken. I think the actual problem lies in package version incompatibilities. I installed the latest versions, so I assumed it would work out of the box.
To Reproduce
Used the original script that is shared here, also tried with own custom inputs, but the same error pops up:
Code sample
Just for the sake of having everythin here, copying the original code:
Expected behavior
The training should not fail with the mentioned error.
Environment
Ubuntu 20.04.5 LTS
Python 3.8.10
torch==1.13.1
,pytorch-lightning==1.9.4
,lightning-flash==0.8.1.post0
NVIDIA GeForce RTX 3090, CUDA Version: 11.6