From 311b6b0286bfa016346bc7fd8b441bbd50216060 Mon Sep 17 00:00:00 2001 From: Vivek Khandelwal Date: Wed, 24 Jan 2024 15:55:12 +0530 Subject: [PATCH] CI: Fix Roll PyTorch CI failure at determining commit hash (#2796) Signed-Off By: Vivek Khandelwal --- .github/workflows/RollPyTorch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/RollPyTorch.yml b/.github/workflows/RollPyTorch.yml index 5c8d74ee0941..4f2d9d8c509a 100644 --- a/.github/workflows/RollPyTorch.yml +++ b/.github/workflows/RollPyTorch.yml @@ -68,7 +68,7 @@ jobs: printf -- "-f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html\n--pre\ntorchvision==%s\n" "${VISION_RELEASE}" > torchvision-requirements.txt # Read the commit hash from the downloaded whl file without extracting it - PT_HASH=$(unzip -p torch-"${PT_RELEASE}"*.whl torch/version.py | grep git_version | awk '{ print $3 }' | tr -d "'") + PT_HASH=$(unzip -p torch-"${PT_RELEASE}"*.whl torch/version.py | grep git_version | tail -1 | awk '{ print $3 }' | tr -d "'") echo "Found torch commit hash ${PT_HASH}" PT_HASH_CHANGED=0