File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -126,15 +126,13 @@ do_not_use_nightly_on_ci() {
126126 # regression as documented in https://github.com/pytorch/executorch/pull/6564
127127 TORCH_VERSION=$( pip list | grep -w ' torch ' | awk -F ' ' {' print $2' } | tr -d ' \n' )
128128
129- pushd .ci/docker || return
130- EXPECTED_TORCH_VERSION=$( cat ci_commit_pins/pytorch.txt)
131- popd || return
132-
133129 # The version of PyTorch building from source looks like 2.6.0a0+gitc8a648d that
134130 # includes the commit while nightly (2.6.0.dev20241019+cpu) or release (2.6.0)
135- # won't have that
136- if [[ " ${TORCH_VERSION} " != * " +git${EXPECTED_TORCH_VERSION: 0: 7} " * ]]; then
137- echo " Unexpected torch version. Expected ${EXPECTED_TORCH_VERSION: 0: 7} from .ci/docker/ci_commit_pins/pytorch.txt, got ${TORCH_VERSION} "
131+ # won't have that. Note that we couldn't check for the exact commit from the pin
132+ # ci_commit_pins/pytorch.txt here because the value will be different when running
133+ # this on PyTorch CI
134+ if [[ " ${TORCH_VERSION} " != * " +git" * ]]; then
135+ echo " Unexpected torch version. Expected binary built from source, got ${TORCH_VERSION} "
138136 exit 1
139137 fi
140138}
You can’t perform that action at this time.
0 commit comments