Skip to content

Commit

Permalink
Pin setuptools for old PyTorch
Browse files Browse the repository at this point in the history
  • Loading branch information
MiroPsota committed Jun 28, 2024
1 parent b39bc34 commit 745b431
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,19 @@ jobs:

- name: Install PyTorch ${{ matrix.torch-version }}+${{ matrix.compute-platform }}
run: |
versionlte() {
[ "$1" = "`echo -e "$1\n$2" | sort -V | head -n1`" ]
}
versionlt() {
[ "$1" = "$2" ] && return 1 || versionlte $1 $2
}
VERSION_LIMIT=""
if versionlt ${{ matrix.torch-version }} "2.2.0" ; then
VERSION_LIMIT="<70"
fi
pip install --upgrade \
wheel \
setuptools \
setuptools$VERSION_LIMIT \
build \
--extra-index-url https://download.pytorch.org/whl/${{ matrix.compute-platform }} \
torch==${{ matrix.torch-version }} \
Expand Down

0 comments on commit 745b431

Please sign in to comment.