Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix PyTorch version in test-against-stable workflow #2085

Closed
wants to merge 12 commits into from
5 changes: 1 addition & 4 deletions .github/workflows/test_stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,12 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
env:
PYTHON_VERSION: ${{ matrix.python-version }}
OS: ${{ matrix.os }}
run: |
python setup.py egg_info
req_txt="botorch.egg-info/requires.txt"
min_torch_version=$(grep '\btorch[>=]=' ${req_txt} | sed 's/[^0-9.]//g')
# 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
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)
min_torch_version="$(if ${{ matrix.python-version == '3.11' }} && ${{ matrix.os == 'macos-latest' }}; then echo "2.0.1"; else echo "${min_torch_version}"; fi)"
min_gpytorch_version=$(grep '\bgpytorch[>=]=' ${req_txt} | sed 's/[^0-9.]//g')
min_linear_operator_version=$(grep '\blinear_operator[>=]=' ${req_txt} | sed 's/[^0-9.]//g')
pip install "torch==${min_torch_version}" "gpytorch==${min_gpytorch_version}" "linear_operator==${min_linear_operator_version}"
Expand Down
Loading