Skip to content

Commit

Permalink
Unpin numpy from <2.0 (#2459)
Browse files Browse the repository at this point in the history
Summary:
This unpins numpy from <2.0, which was done as a temporary workaround in #2382 to avoid issues with windows builds.

The underlying issue was an incompatibility between pytorch 2.4.0 windows builds and numpy 2.0. Pointed pip to the updated pytorch pip index to pick up newer 2.5.0 dev versions to resolve the issue: #2459 (comment)

There is still the issue of existing torch release windows binaries potentially not being compatible with numpy 2.0, but that shouldn't be something that we need to handle.

Pull Request resolved: #2459

Reviewed By: esantorella

Differential Revision: D60735276

Pulled By: Balandat

fbshipit-source-id: 5af618222a6ad8acbedfecc3a7ca4f8a6b45d098
  • Loading branch information
Balandat authored and facebook-github-bot committed Aug 5, 2024
1 parent e44280e commit c1b73b8
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 13 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/deploy_on_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ jobs:
run: |
# avoid conda bug in >=23.10.0: https://github.com/conda/conda/issues/13412
conda config --set solver classic
# avoid issues with numpy 2.0 on windows builds and in tensorboard
conda install -y "numpy<2.0"
conda install -y setuptools_scm conda-build conda-verify anaconda-client
conda install -y scipy sphinx pytest flake8 multipledispatch
conda install -y -c pytorch pytorch cpuonly
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
env:
ALLOW_LATEST_GPYTORCH_LINOP: true
run: |
pip install --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu
pip install git+https://github.com/cornellius-gp/linear_operator.git
pip install git+https://github.com/cornellius-gp/gpytorch.git
pip install .[test]
Expand Down Expand Up @@ -81,8 +81,6 @@ jobs:
run: |
# avoid conda bug in >=23.10.0: https://github.com/conda/conda/issues/13412
conda config --set solver classic
# avoid issues with numpy 2.0 on windows builds and in tensorboard
conda install -y "numpy<2.0"
conda install -y scipy multipledispatch setuptools_scm conda-build conda-verify
conda config --set anaconda_upload no
conda install -y -c pytorch-nightly pytorch cpuonly
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_test_pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
env:
ALLOW_LATEST_GPYTORCH_LINOP: true
run: |
pip install --pre torch -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu
pip install git+https://github.com/cornellius-gp/linear_operator.git
pip install git+https://github.com/cornellius-gp/gpytorch.git
pip install .[test]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_tutorials.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- if: ${{ !inputs.use_stable_pytorch_gpytorch }}
name: Install latest PyTorch & GPyTorch
run: |
pip install torch torchvision -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
pip install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cpu
pip install git+https://github.com/cornellius-gp/linear_operator.git
pip install git+https://github.com/cornellius-gp/gpytorch.git
- if: ${{ inputs.use_stable_pytorch_gpytorch }}
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ jobs:
run: |
# avoid conda bug in >=23.10.0: https://github.com/conda/conda/issues/13412
conda config --set solver classic
# avoid issues with numpy 2.0 on windows builds and in tensorboard
conda install -y "numpy<2.0"
conda install pytorch torchvision -c pytorch
conda install -y pip scipy sphinx pytest flake8
pip install git+https://github.com/cornellius-gp/linear_operator.git
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/test_stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ jobs:
run: |
# avoid conda bug in >=23.10.0: https://github.com/conda/conda/issues/13412
conda config --set solver classic
# avoid issues with numpy 2.0 on windows builds and in tensorboard
conda install -y "numpy<2.0"
conda install -y -c pytorch pytorch cpuonly
conda install -y pip scipy pytest
conda install -y -c gpytorch gpytorch
Expand Down
1 change: 0 additions & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ dependencies:
- scipy
- multipledispatch
- pyro-ppl>=1.8.4
- numpy<2.0
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ torch>=1.13.1
pyro-ppl>=1.8.4
gpytorch==1.12
linear_operator==0.5.2
numpy<2.0

0 comments on commit c1b73b8

Please sign in to comment.