-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Big doc revamp - simplify and improve the subpackage pages #4783
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
Conversation
💊 CI failures summary and remediationsAs of commit 3f48e2c (more details on the Dr. CI page):
2 failures not recognized by patterns:
This comment was automatically generated by Dr. CI (expand for details).Please report bugs/suggestions to the (internal) Dr. CI Users group. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand that more work is needed to iron out some of the issues but I think this is already a major improvement in terms of readability. I would be in favour of merging it and continue changes on a follow up PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is so awesome ❤️ @NicolasHug
I have few thoughts, hope you don't mind 😅
|
||
torchvision.ops | ||
=============== | ||
Operators |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to suggest this from long time, current operators page look a bit bloated.
We should probably divide in sections.
E.g. operators on boxes, operators on masks, detection operators, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely, one positive thing about the changes in this PR is that it surfaces our current doc structure weaknesses and it makes them more obvious, which will allow us to fix them.
To keep things manageable though, I would leave this out for future improvements, otherwise there will be too many things to review at once
:template: function.rst | ||
|
||
.. autofunction:: draw_segmentation_masks | ||
draw_bounding_boxes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And specific reason to change the order?
It's kinda nice to push make_grid
down as we don't actively maintain it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's kinda nice to push make_grid down as we don't actively maintain it.
That'st the reason :)
docs/source/index.rst
Outdated
:maxdepth: 2 | ||
:caption: Package Reference | ||
|
||
models |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Somehow the brain of users is accustomed to see docs in the previous order.
It might be unpleasant to change to order. I love the previous order. And kind off in presentations related to torchvision, E.g. Francisco's at PyTorch day, he presents by the previous order,
Would love the old order :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The old order is alphabetical, and might not reflect the order of what users may be looking for.
I think that users are more interested in models, transforms and ops than say i.o. operations, so I changed the order to reflect the importance of each section. Obviously it's not set in stone and I'm happy to hear other's thoughts, but I don't think we should worry too much about current readers' habits. It's still very obvious which section corresponds to what, so users will get used to this one fast :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So let's arrange according to usage order. Simple LFU caching here 😄
Datasets like MNIST, ImageNet are universal, so probably everyone needs it.
Transforms to convert ToTensor etc Are almost in every code.
Models are not used all places.
Ops are then used a bit more scarce.
Utils, are least used I think,
So the order datasets, transforms, models, ops, utils :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the input @oke-aditya , I will update accordingly
|
||
torchvision.models | ||
################## | ||
Models and pre-trained weights |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure they're using Title Case - see e.g. "Features for large-scale deployments" or "Autograd mechanics".
They're uing "Automatic Mixed Prececision" and "Distributed Data Parallel" and "Frequently Asked Questions" because these are commonly known and shortened AMP, DDP, FAQ, etc.
docs/source/index.rst
Outdated
ops | ||
io | ||
models | ||
feature_extraction |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think We should club this with models, just after it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should club this with models
I agree, I think eventually we will move it into the "Models and pre-trained weights" section. It is torchvision.models.feature_extraction
after all. But since the models section needs a much bigger revamp, I wanted to leave this out for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, thanks!
…4783) Reviewed By: datumbox Differential Revision: D32064695 fbshipit-source-id: 9a5dca1cf2ff702e7a631c473c408fe7ca496670
This PR adds a minor update to the side TOC by changing the order and the title of the sections, instead of the non-informative module names (see screenshot) (EDIT: order was upated since screenshot).
This PR also adds a major update which consist in putting each function and class into their own page. This adds a few benefits:
Note: the model page still needs a significant update, more PRs will come later.
Here are the rendered docs: https://945987-73328905-gh.circle-artifacts.com/0/docs/index.html vs the current docs: https://pytorch.org/vision/stable/index.html