Skip to content

Revamping our Quantized models docs #5987

Closed

Description

@NicolasHug

We're re-writing our models docs to make them clearer, simpler, and to properly document the upcoming multi-weight API. This issue is about adding docs for the Quantized classification models.

Our latest new docs are currently here (this link is likely outdated by the time you look at it, but it doesn't matter; the skeleton is there). We created a separate section that will eventually be merged into the main one. We have documented a few models, but most of them are still missing. The list of models that still need docs is listed below. If you'd like to participate, please comment below with a message saying "I'm working on XYZ" where XYZ is a model, so that others don't pick the same as you do. To keep things simple, please submit one PR per model, but feel free to contribute more than one model.

How to write docs for a model

Note: below are detailed instructions. This makes it look more complicated than it actually is. Don't be scared!

A great place to start is to look a the changes in this PR that documents SqueezeNet. You'll need to do exactly the same for your model:

  • Create a new .rst file in https://github.com/pytorch/vision/tree/main/docs/source/models. The file should look like this, with a link to the original paper, and a list of the corresponding model builders. It should also mention the base model class and link to the .py file where it is defined.
  • Update the list in https://github.com/pytorch/vision/blame/main/docs/source/models_new.rst to link to this new file (without the .rst suffix). Please keep the list alphabetically sorted
  • Update the docstring of each new model builder, similarly to this one.
    • there is a 1:1 mapping between a model builder and a Weight enum. For example, the docstring of squeezenet1_0 makes direct references to SqueezeNet1_0_Weights. For Quantized models there might be more weights for a single model builder, check the link above!
    • don't forget the autoclass directive in the docstring. This will auto-generate documentation for the Weight enums. You don't need to understand how this is done, but if you're curious, it's done here.

To build the docs locally, please look at our contributing guide. You won't need to worry about the gallery example, so always use make html-noplot instead of make html to save time.

Please don't hesitate to ping us if you need any help / guidance or if you have any question!


Quantized models that need docs are:

Activity

  1. NicolasHug commented on May 11, 2022

    @NicolasHug
    MemberAuthor

    CC @yassineAlouini as you were intersted!

  2. datumbox commented on May 11, 2022

    @datumbox
    Contributor

    @NicolasHug good call, let's get those final models done and add any remaining info. :)

    Since our next release is not too far away and we got lots of work to do still on the documentation, I'll be cheeky and tag some of our good usual suspects in case they can give us a hand and get this done faster: @oke-aditya @lezwon @zhiqwang @abhi-glitchhg @xiaohu2015 @frgfm. Don't feel obliged, just a ping in case you have time.

  3. zhiqwang commented on May 11, 2022

    @zhiqwang
    Contributor

    Hi @NicolasHug and @datumbox ,

    I would like to take ShuffleNet v2.

  4. xiaohu2015 commented on May 11, 2022

    @xiaohu2015
    Contributor

    I can take ResNet

  5. abhi-glitchhg commented on May 11, 2022

    @abhi-glitchhg
    Contributor

    I can work on MobileNetV3.

  6. yassineAlouini commented on May 12, 2022

    @yassineAlouini
    Contributor

    Inception if it is still available. 👌

  7. lezwon commented on May 12, 2022

    @lezwon
    Contributor

    I'll take up MobileNetV2

  8. frgfm commented on May 12, 2022

    @frgfm
    Contributor

    Shoot I arrived to late this time 😅
    Let me know if one of you cannot do his part in the end!

  9. datumbox commented on May 13, 2022

    @datumbox
    Contributor

    @frgfm This the open-source version of music chairs: Ping more contributors than tickets and see what happens. 😄 😆

    In all seriousness thanks for responding and no worries. We are very lucky to have you all supporting us like this. We got many more improvements on the pipeline coming up that we could use your help. Thanks for the support!

  10. NicolasHug commented on May 13, 2022

    @NicolasHug
    MemberAuthor

    @frgfm actually I forgot Resnext and it' still up for grabs! Would you like to take it?

  11. datumbox commented on May 16, 2022

    @datumbox
    Contributor

    @zhiqwang @frgfm We are aiming to finalize the models by mid week to start preparing for the release. Let us know if you need any help with the PRs for ShuffleNetV2 and ResNeXt. If you are busy no worries, just let us know and we will pick it up or finish any incomplete PRs you might got. Thanks!

  12. zhiqwang commented on May 16, 2022

    @zhiqwang
    Contributor

    Hi @datumbox , I can work for ShuffleNetV2 tomorrow .

  13. frgfm commented on May 16, 2022

    @frgfm
    Contributor

    Happy how the musical chairs ended up haha
    I'll take ResNext gladly :)

  14. datumbox commented on May 17, 2022

    @datumbox
    Contributor

    Wow I think we are done! Thanks a lot for the help!

  15. NicolasHug commented on May 17, 2022

    @NicolasHug
    MemberAuthor

    <3 Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions