segmentation_models.pytorch icon indicating copy to clipboard operation
segmentation_models.pytorch copied to clipboard

Locked version of `timm` dependency

Open ligaz opened this issue 3 years ago • 6 comments

Is there a reason to depend on specific version of PyTorch Image Models timm==0.4.12 instead of using something like >=0.4.12 as a version specifier?

The context for the question is this issue.

ligaz avatar Jul 29 '22 14:07 ligaz

The reason is that API tends to change, especially in such quick-developing libraries as timm! In one day you can appear with not working code because of that, I prefer to fix the version, but you can always update it after installing.

qubvel avatar Jul 29 '22 16:07 qubvel

Would it be possible to lock it based on semver to something like >=0.4.12,<0.7? Also, would it be possible to update the locked version so we can use newer timm? In TorchGeo, we use dependabot to check to see if new versions break compatibility and use semver pins for all dependencies. This has proven to be extremely stable for us.

I've noticed that this isn't exactly the first issue to request support for modern versions of timm...

  • #562
  • #429
  • #424
  • #418
  • #417
  • #308
  • #295
  • #271

Given that one of the most popular feature requests in this library is upgrading the version of timm, I think it's safe to say that the current solution is problematic.

adamjstewart avatar Jul 29 '22 17:07 adamjstewart

I have updated timm version, but a new version, unfortunately, breaks the code https://github.com/qubvel/segmentation_models.pytorch/runs/7586507780?check_suite_focus=true

qubvel avatar Jul 29 '22 22:07 qubvel

I will fix and update it later, there are some changes, not seeing a quick fix for it

qubvel avatar Jul 29 '22 22:07 qubvel

Yeah, looks like TorchGeo doesn't work with segmentation_models_pytorch 0.3 either: https://github.com/microsoft/torchgeo/pull/692. Hoping we can figure out how to support both 0.2 and 0.3 so we don't have to pin to a specific version.

adamjstewart avatar Jul 29 '22 22:07 adamjstewart

On my side I add to change _model_default_cfgs to _model_pretrained_cfgs in: https://github.com/qubvel/segmentation_models.pytorch/blob/c98c88d13481c956b232dec6fc13609859838d7a/segmentation_models_pytorch/encoders/init.py#L100

JulienMaille avatar Jul 30 '22 07:07 JulienMaille

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Sep 29 '22 02:09 github-actions[bot]

This issue was closed because it has been stalled for 7 days with no activity.

github-actions[bot] avatar Oct 07 '22 02:10 github-actions[bot]