-
Notifications
You must be signed in to change notification settings - Fork 74
Add docstrings for samplers #338
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
| invalid indices, so the ``policy`` parameter defines how to replace | ||
| those frames, with valid indices: | ||
| - "repeat": repeats the last valid frame of the clip. We would get |
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.
Really minor, but the left quotation mark for "repeat", "wrap" and "error" is facing the wrong way in the rendered docs. I'm not sure how or even if we can fix it. Uses of quotes in the middle of text seem fine (like "dilation" on line 240).
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 noticed this too lol, no idea why. This is likely related to the pytorch-sphinx-theme css style.
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, all of my comments are just minor improvements. On the code organization: makes sense to me, let's go with this and see how it feels to live with it. One thought: should we put a comment (not a docstring!) at the top of the functions themselves saying that the official docs are in _common.py? |
This PR adds docstring to the samplers. This is just docstrings, not the entire docs. Tutorials / examples / user guides will come later.
This PR is best reviewed by checking it out locally, building and visualizing the docs on your own machine. Alternatively you can download the built docs artifacts from the CI job.
You'll see that I went for a non-classical way of specifying the docs. Similar setups exist in repos like pytorch/pytorch. The main advantage is that it can centralize the docs, avoids repetition, and makes edits easier. The main drawback is that docs are harder to figure out when browsing the code - getting the docs require going online to see the html files.
I don't mind reverting to a more conventional setup if you prefer, but I'll ask to do this only later, when the docs are a bit more stable. I will be writing tutorials in follow-up PRs, and I suspect I'll have to update the docstrings. It will be a lot easier to do so in the current setup.