`pip install lightning-flash[image]` results in torch downgrade to 1.8.1
See original GitHub issue🐛 Bug
One of the dependencies of lightning-flash requires torch version <= 1.7.1, this is untenable for my use case and really needs to be fixed. I believe it’s an issue with icevision. As you can see icevision requires torch version strictly less than 1.9.
To Reproduce
Have torch > 1.9 installed in a conda environment. Attempt to install lightning-flash[image]. Obeserve at some point pip attempting to downgrade torch. This has now occurred on two separate machines with separate architectures, which isn’t a huge issue on Linux (my requirement of 1.9 is on Windows), but on Windows it replaces the GPU version of pytorch with the CPU version.
Environment
- PyTorch Version (e.g., 1.0): 1.9
- OS (e.g., Linux): Linux + Windows
- How you installed PyTorch (
conda,pip, source): conda - Build command you used (if compiling from source):
- Python version: 3.7 and 3.8
Additional context
I can trick it a bit if I install it with no dependencies. This is what I’ve had to do and then manually install each missing package as it comes up.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (5 by maintainers)

Top Related StackOverflow Question
Hi @dlangerm whoops, meant to close this issue. IceVision is now a fully optional dependency in flash 0.5.0 😃 only required for the IceVision based tasks (object detection, keypoint detection, and instance segmentation).
Hi @dlangerm thanks for reporting this! Yeah, this seems to be caused by the install of icevision. I think we can do a small refactor here to make this work, just move icevision to a fully optional dependency for a handful of tasks.