-
Notifications
You must be signed in to change notification settings - Fork 370
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
The new lightly release breaks BaseTask with timm imports #1824
Comments
Thanks for the bug report! We also noticed this when dependabot tried to update our lightly dependency in #1823. Here is a rundown of how this bug surfaced. It's actually pretty complicated (and interesting!) The issue started when lightly v1.4.26 added an optional dependency on timm in lightly-ai/lightly#1479. If timm is available, lightly exposes additional parts of the API and imports certain features of timm. However, the features it uses are only available starting in timm v0.9.9: huggingface/pytorch-image-models#1996. At the same time, TorchGeo depends on segmentation-models-pytorch, which requires timm v0.9.2: https://github.com/qubvel/segmentation_models.pytorch/blob/v0.3.3/requirements.txt#L4. We've asked them many times not to pin to a specific version of timm, but to no avail. The library itself may not even be maintained anymore, there haven't been any updates in quite some time. So the short-term fix is to pin TorchGeo to depend on |
For anyone who encounters this issue, the current workaround is:
It looks like this is going to be fixed in the next lightly release: lightly-ai/lightly#1487 |
This is now fixed in main and will be included in the next release. It's also been fixed in lightly itself (lightly-ai/lightly#1487), so future lightly releases will be fine. We're still considering migrating from smp to torchseg to remove the timm version constraint, which will also alleviate this issue. |
Thanks for the quick response and keeping us up to date with the progress!
|
FYI, lightly 1.5.0 has now been released and fixes this bug. |
Description
The new 1.4.26 release of lightly (https://pypi.org/project/lightly/#history), pulled by default when installing torchgeo, tries to run
with results in the error:
This can be fixed by locking the version for lightly
Steps to reproduce
Import any trainer that inherits from BaseTask
Version
0.5.1
The text was updated successfully, but these errors were encountered: