Skip to content
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

Loading weights from TorchVision will stop working #1848

Closed
datumbox opened this issue Apr 1, 2022 · 8 comments · Fixed by #1867
Closed

Loading weights from TorchVision will stop working #1848

datumbox opened this issue Apr 1, 2022 · 8 comments · Fixed by #1867
Assignees

Comments

@datumbox
Copy link

datumbox commented Apr 1, 2022

Hi OpenMMLab team, Thanks for your awesome work on MMCV.

The current implementation of get_torchvision_models() is trying to access the model_urls variable that existed in some backbone implementations of TorchVision. TorchVision considers this variable non-public (because it's not included in the __all__) and non-standard (because it's not available in all models) and thus plans to remove it on the next version. We are currently moving on a new API that will allow us to support multiple pretrained weights for every model variant (read more here). This change has recently landed at TorchVision on pytorch/vision#5618.

To avoid breakages, we recommend to update your code. A few options include to:

  1. Access the URLs from the new public locations
  2. Move the the model_urls maps on your side
  3. Something else, happy to work with you to figure it out

We intentionally released this change several months before the next release to give time to iron out issues like that. Let me know your thoughts on how we should go about it. Thanks!

@zhouzaida
Copy link
Collaborator

zhouzaida commented Apr 1, 2022

Hi @datumbox, thank you for your reminders and suggestions, we will modify the code accordingly.

@datumbox
Copy link
Author

datumbox commented Apr 1, 2022

@zhouzaida Thanks a lot for the reply.

We have a dedicated issue for feedback about the new API at pytorch/vision#5088; if you find any issues we would love to know and act upon it. Also let me know if there is anything we can do on our side to help.

@zhouzaida
Copy link
Collaborator

Got it. We are trying to update our code.

@zhouzaida zhouzaida linked a pull request Apr 13, 2022 that will close this issue
7 tasks
@HAOCHENYE
Copy link
Collaborator

@datumbox Hi, will these features be released in torchvison 0.13.0? We try to handle these changes by checking the version of torchvision.

@datumbox
Copy link
Author

@HAOCHENYE yes that's correct. Starting from 0.13, TorchVision will adopt the new API. The plan is for the old one to remain available for 2 versions (planned for removal on 0.15) but it will emit a warning if used. Let me know if you have any feedback or need more info. Thanks!

@zhouzaida
Copy link
Collaborator

Hi @datumbox , thanks for your awesome work on torchvision. We are trying to handle these changes and we want to know when will the new version v0.13 be released?

@datumbox
Copy link
Author

@zhouzaida Apologies for the delay getting back to you. I was OOO.

We don't have a fixed date yet but we expect it to be around end of June or beginning of July.

@zhouzaida
Copy link
Collaborator

@zhouzaida Apologies for the delay getting back to you. I was OOO.

We don't have a fixed date yet but we expect it to be around end of June or beginning of July.

Got it. Thanks for your reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants