pytorch
3e6579b8 - Don't print fatal:... in generate_torch_version.py (#88335)

Commit
2 years ago
Don't print fatal:... in generate_torch_version.py (#88335) During build, users commonly see a message like ``` fatal: no tag exactly matches 'd8b4f33324b1eb6c1103874764116fb68e0d0af4' ``` which is usually ignored when builds succeed, but has confused users when build fails (due to a different issue). This PR removes the red herring, since this usually prints for local development when tags are not found. We catch the exception anyway and handle it under the hood, so we don't need to print it and confuse the user. Test plan: Note that builds on trunk current have this line, cmd-F 'fatal: no tag exactly matches' in https://github.com/pytorch/pytorch/actions/runs/3379162092/jobs/5610355820. Then check in the PR build to see that the line no longer appears. I also tagged my commit locally and printed what tag would be--this code and the old code printed the same results for what tag would be. Pull Request resolved: https://github.com/pytorch/pytorch/pull/88335 Approved by: https://github.com/seemethere
Author
Committer
Parents
Loading