Skip to content

Commit 85cec4c

Browse files
Balandatfacebook-github-bot
authored andcommitted
Hack around missing pytorch 1.13.1 binaries for py3.11 on mac (#1966)
Summary: This fix is needed to avoid errors in the CI Pull Request resolved: #1966 Reviewed By: saitcakmak Differential Revision: D47978234 Pulled By: Balandat fbshipit-source-id: c5024a36ce8a0952debdea4aa1cbc3ffb925031d
1 parent 3b674eb commit 85cec4c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.github/workflows/test_stable.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,15 @@ jobs:
7070
with:
7171
python-version: ${{ matrix.python-version }}
7272
- name: Install dependencies
73+
env:
74+
PYTHON_VERSION: ${{ matrix.python-version }}
75+
OS: ${{ matrix.os }}
7376
run: |
7477
python setup.py egg_info
7578
req_txt="botorch.egg-info/requires.txt"
7679
min_torch_version=$(grep '\btorch[>=]=' ${req_txt} | sed 's/[^0-9.]//g')
80+
# HACK around the fact that pytorch does not offer a mac binary for 1.13.1 for py3.11 - TODO: Remove when bumping torch to 2.0.1
81+
min_torch_version=$(if [[ "${min_torch_version}"=="1.13.1" ]] && [[ "${PYTHON_VERSION}"=="3.11" ]] && [[ "${OS}"=="macos-latest" ]]; then echo "2.0.1"; else echo "${min_torch_version}"; fi)
7782
min_gpytorch_version=$(grep '\bgpytorch[>=]=' ${req_txt} | sed 's/[^0-9.]//g')
7883
min_linear_operator_version=$(grep '\blinear_operator[>=]=' ${req_txt} | sed 's/[^0-9.]//g')
7984
pip install "torch==${min_torch_version}" "gpytorch==${min_gpytorch_version}" "linear_operator==${min_linear_operator_version}"

0 commit comments

Comments
 (0)