-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make WeightsEnum public #7094
Comments
Thanks for the feature request @adamjstewart . It's great to see torchgeo adopt the same API! I think we're open to make the |
On the topic of WeightsEnum, I noticed that there is no md5 attribute and no checksumming done when downloading weights like there is for datasets. Should there be? (I can open a separate issue for this if you want) |
Sure @adamjstewart , that sounds reasonable. A new issue sounds like the best way forward. |
I believe this was addressed in #7100 and thus this issue can be closed |
馃殌 The feature
I propose making
torchvision.models._api.WeightsEnum
public and adding documentation for it.Motivation, pitch
TorchGeo is adopting torchvision's new multi-weight support API: microsoft/torchgeo#917
All of our weights subclass
WeightsEnum
, but this requires us to import directly fromtorchvision.models._api
. Since this module is prefixed by an underscore, I'm assuming this class is private and subject to change. Also, since this class isn't documented, we have to silence Sphinx warnings about the missing parent class docs.Alternatives
We could copy-n-paste your
WeightsEnum
implementation but code duplication is bad and I don't want to deal with legal. We could keep importing from a private module but it may change in the future. Are there any other suggested alternatives for other libraries trying to copy the same design? Maybe this could be moved into TorchData?Additional context
@nilsleh
The text was updated successfully, but these errors were encountered: