Repository navigation
Add a precommit hook to automatically update .ci/docker/ci_commit_pins/pytorch.txt when torch_pin.py is changed. - #15072
Merged
Merged
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/15072
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ❌ 3 New Failures, 3 Cancelled Jobs, 13 Pending, 3 Unrelated FailuresAs of commit a4f8fee with merge base 481c9cf ( NEW FAILURES - The following jobs have failed:
CANCELLED JOBS - The following jobs were cancelled. Please retry:
FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Gasoonjia
reviewed
Oct 13, 2025
| @@ -0,0 +1,57 @@ | |||
| # Git Hooks | |||
Contributor
Author
There was a problem hiding this comment.
You mean this line or the whole file?
Contributor
Author
There was a problem hiding this comment.
Feel like it is helpful. Developers will have to do some manual install to enable this.
Gasoonjia
pushed a commit
that referenced
this pull request
Oct 14, 2025
…s/pytorch.txt when torch_pin.py is changed. (#15072) This pull request introduces a new script, `.github/scripts/update_pytorch_pin.py`, which automates the process of updating the PyTorch commit pin based on the nightly version specified in `torch_pin.py`. The script parses the nightly version, fetches the corresponding commit hash from the PyTorch nightly branch using the GitHub API, and updates the pin file accordingly. This automation helps ensure that the CI environment uses the correct nightly commit for PyTorch. Automation of PyTorch nightly pin updating: * Added `.github/scripts/update_pytorch_pin.py`, a script that reads the nightly version from `torch_pin.py`, parses the date, fetches the corresponding commit hash from the PyTorch nightly branch via the GitHub API, and updates `.ci/docker/ci_commit_pins/pytorch.txt` with the new hash. Test plan: Run `.githooks/install.sh` Tested manually by changing `NIGHTLY_VERSION` and try to commit locally. Was able to see `.ci/docker/ci_commit_pins/pytorch.txt` being updated.
jirioc
pushed a commit
to nxp-upstream/executorch
that referenced
this pull request
Dec 19, 2025
…s/pytorch.txt when torch_pin.py is changed. (pytorch#15072) This pull request introduces a new script, `.github/scripts/update_pytorch_pin.py`, which automates the process of updating the PyTorch commit pin based on the nightly version specified in `torch_pin.py`. The script parses the nightly version, fetches the corresponding commit hash from the PyTorch nightly branch using the GitHub API, and updates the pin file accordingly. This automation helps ensure that the CI environment uses the correct nightly commit for PyTorch. Automation of PyTorch nightly pin updating: * Added `.github/scripts/update_pytorch_pin.py`, a script that reads the nightly version from `torch_pin.py`, parses the date, fetches the corresponding commit hash from the PyTorch nightly branch via the GitHub API, and updates `.ci/docker/ci_commit_pins/pytorch.txt` with the new hash. Test plan: Run `.githooks/install.sh` Tested manually by changing `NIGHTLY_VERSION` and try to commit locally. Was able to see `.ci/docker/ci_commit_pins/pytorch.txt` being updated.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new script,
.github/scripts/update_pytorch_pin.py, which automates the process of updating the PyTorch commit pin based on the nightly version specified intorch_pin.py. The script parses the nightly version, fetches the corresponding commit hash from the PyTorch nightly branch using the GitHub API, and updates the pin file accordingly. This automation helps ensure that the CI environment uses the correct nightly commit for PyTorch.Automation of PyTorch nightly pin updating:
.github/scripts/update_pytorch_pin.py, a script that reads the nightly version fromtorch_pin.py, parses the date, fetches the corresponding commit hash from the PyTorch nightly branch via the GitHub API, and updates.ci/docker/ci_commit_pins/pytorch.txtwith the new hash.Test plan:
Run
.githooks/install.shTested manually by changing
NIGHTLY_VERSIONand try to commit locally. Was able to see.ci/docker/ci_commit_pins/pytorch.txtbeing updated.