-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Add scripts for facilitating generating release notes #3973
Conversation
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 @fmassa , LGTM.
Perhaps this could benefit from a few instructions? Like what should the commit hash be, etc.
Regarding the notebook, maybe we can just push it as a Github Gist and link to it from this file. It's likely that the notebook code will change a bit with every release, so I would avoid adding it in the repo.
scripts/release_notes/common.py
Outdated
import os | ||
import json | ||
|
||
categories = [ |
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've noticed that some categories/topics we use on TorchVision are missing. For example code quality
, tests
, ci
etc. Shall we add them?
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.
more like we should remove categories
and topics
as they're not used at all in this script ^^
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 maintain them because they allow us to keep track of Better Engineering efforts. We could update the script to remap them under an umbrella topic related to improving infra.
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 could update the script to remap them under an umbrella topic related to improving infra.
What do you mean by that?
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.
FYI those categories were taken as is from PyTorch, and we haven't used them yet in our scripts. I can clean up this script further (it's mostly a dump of what I used for generating the release notes, not really cleaned up yet)
@fmassa @datumbox I took the liberty to push to this PR, I removed some unused variables as agreed above, and added minimal (but I think sufficient) instructions on how to use the script. As you can see I'm linking to https://nbviewer.org/gist/NicolasHug/248a72aa086fd874936f16eb56240226 which is the notebook I've been using. I'd rather not include the notebook in the repo, because its content will change often, and notebook + github = headache (diffs are unreadable, changes are thousands of lines long, etc.) |
@NicolasHug Your modifications look fine to me. I agree that adding the notebook is messy. How do you feel about adding just the python code of the notebook? |
I feel like we would need to copy/paste the code back into a notebook for it to be useful, but maybe there's a usage that I'm missing? |
You are right, though you could just print stuff on output. The only reason I advocate adding them on the repo is because it will maintain history. A link on a notebook or a gist isn't as reliable. Not a blocker for me either way. |
@@ -0,0 +1,121 @@ | |||
# In[1]: |
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 added the script with these @datumbox , some IDEs like vscode and maybe pycharm understand these as a notebook so the .py
file can be used directly as a notebook withing the IDE
Hey, The notebooks won't create a big diff I think, we ignore those using linguist documentation in .gitattributes. https://github.com/pytorch/vision/blob/main/.gitattributes |
E.g PR #3594 This did not flood with diffs from notebook |
You're right @oke-aditya , thanks for noting this. But the fact that we completely hide the notebooks diffs also means that they're impossible to review :p It's not just because of the diff that I'm reluctant to include the notebook though: notebooks are usually much larger files than pure text |
Hey @NicolasHug! You merged this PR, but no labels were added. The list of valid labels is available at https://github.com/pytorch/vision/blob/main/.github/process_commit.py |
* Add scripts for facilitating generating release notes * remove unused lists, and added instructions, applied balck * renamed file * Added pandas script directly Co-authored-by: Nicolas Hug <nicolashug@fb.com> Co-authored-by: Nicolas Hug <contact@nicolas-hug.com>
Summary: * Add scripts for facilitating generating release notes * remove unused lists, and added instructions, applied balck * renamed file * Added pandas script directly Reviewed By: NicolasHug Differential Revision: D31758306 fbshipit-source-id: 58675f491b811dab8a58bca9e4235551684145bd Co-authored-by: Nicolas Hug <nicolashug@fb.com> Co-authored-by: Nicolas Hug <contact@nicolas-hug.com>
* Add scripts for facilitating generating release notes * remove unused lists, and added instructions, applied balck * renamed file * Added pandas script directly Co-authored-by: Nicolas Hug <nicolashug@fb.com> Co-authored-by: Nicolas Hug <contact@nicolas-hug.com>
Mostly copy-pasted from https://github.com/pytorch/pytorch/blob/master/scripts/release_notes/common.py with minor modifications to make it suited to torchvision
This implements the approach discussed in #3351, which gathers the GitHub labels for all the PRs between two commits, and outputs it in a json file, and was used to generate the release notes.
There is still some extra clean-up that needs to be done, including adding some functionality from some jupyter notebooks that we used to trim a bit more the data, but I'm sending this here as it can already be helpful.
cc @seemethere