-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Inconsistent use of handle_legacy_interface()
across model builders
#6564
Comments
I understand that retroactively supporting Does this mean we will have to support |
Another Q: do I understand correctly that:
|
Correct, this would align our approach not only within v0.13 but across all versions. This will also ensure that the downstream libraries can use TorchVision without breakages. I saw you already commented on the PR #6565 that does this.
Correct. The feedback both by internal and external stakeholders was that they didn't want to pin PyTorch (and as a result TorchVision) to the latest version as of yet. They will eventually but this needs to be coordinated. You can see more details by following the external issues and PRs linked to #6365.
I have already issued fixes to the major libraries/frameworks encouraging them to move on. But we certainly don't want to force key players who can't move on the latest version of PyTorch because of CUDA, cloud vendors or other restrictions. I think whether we will remove all support at v0.15 needs to be discussed broadly in our team factoring in feedback from key internal and external stakeholders. Depending on what we will decide, we will update our warnings accordingly. Happy to chat more on our next 1:1. |
There are various things to consider here. Easing the adoption of downstream libs is critical, but OTOH we also want to have a clear statement about our deprecation messages and timelines. This is probably something that should be discussed more broadly with the team, since it directly relates to our deprecation policy. Perhaps this was discussed in yesterday's meeting? |
🐛 Describe the bug
We got feedback from some of our downstream frameworks (MMLabs, MobileCV, FastAI, Lightning, etc) that they are not yet ready to pin TorchVision to v0.13 or higher. This means that for compatibility reasons, they are forced to continue using the
pretrained=True
idiom. For the majority of the models, that's OK because we use thehandle_legacy_interface()
decorator to set the right weights. Unfortunately not all models support it and thus when they try to initialize the new models they get errors.For example, the following at MobileCV:
Raises an exception:
The use (or lack of use) of the decorator is not consistent. For example in v0.13 we released the
efficientnet_v2_s
which uses the decorator and theswin_t
which doesn't. Similarlyshufflenet_v2_x1_5
uses it butresnext101_64x4d
doesn't. This lack of consistency across newly introduced models in v0.13 is probably a bug.Adding it everywhere will ensure the behaviour is aligned across the library and will help the downstream frameworks transition smoother to the new idiom.
Versions
latest main branch
cc @jdsgomes @YosuaMichael
The text was updated successfully, but these errors were encountered: