An easy way to make huggingface PRs
Do one time:wget https://github.com/stas00/git-tools/blob/master/how-to-make-pr/github-make-pr-branch
chmod u+x github-make-pr-branch
sudo cp github-make-pr-branch /usr/bin/(or put it in your localbinpath)And then any time you want to work on a newhuggingfacetransformersfeature, just run:github-make-pr-branch ssh GITHUB-USERNAME huggingface transformers new-featureIt will:Fork the project if neededSet up this fork to track the upstreamSync your fork to upstream masterCreate ‘new-feature’ branchSet its upstream for an easy pushNow you just need to:cd transformers-new-featuredo your magic and when ready:git commit -a
git pushand the PR is ready (just need to go to github and click on PR suggestion to submit)It, of course, works for any github project.If this is useful I can make a PR to add instructions toCONTRIBUTING.pm.This could also be converted in an even simpler script invocation specific totransformers, so it’ll just need:transformers-pr new-featurecurrently it uses an ssh access.There is also a detailed guide toHow to Make a Pull Request (PR).
2020-07-27T18:33:52Z
Cool!Another way is to directly use thegithub cli.My own process:Clone repogit clone repo_urlCreate new branchgit checkout -b feat-add_cool_stuffRegular commits (I do them through VS Code because I like the interface)Send PR with github cligh pr create
2020-07-27T20:46:15Z
Even though I appreciate the effort that you put into this, I agree with boris that the standard git way to do this should be simple enough. If, however, this should be implemented intransformers, it probably should be in the existingtransformers-clidirective rather than a separate command.
2020-07-28T19:26:04Z
boris:gh pr creategh pr statusis an incredible command. Tyvm@boris!