Skip to content

Commit

Permalink
[test] Fix regression tests (#537)
Browse files Browse the repository at this point in the history
* Fix regression tests

Summary:

Torch 2.2 is compiled with numpy 1.x, but when we `pip install -r
requirements-dev.txt` we download a higher version of numpy (2.0)

This causes an error with the .numpy() calls and importing torch in
general. I don't think we want to pin the versions in
requirements-dev.txt, so instead I added a pin to the numpy version in
the specific torch spec, so it'll only run for 2.2.

PT 2.3+ support numpy 2.0+ which is why those test don't fail.

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

* use == and specify for CPU as well

* update
  • Loading branch information
jcaip authored Jul 24, 2024
1 parent 5787e9e commit e5df48e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/regression_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
include:
- name: CUDA 2.2.2
runs-on: linux.g5.12xlarge.nvidia.gpu
torch-spec: 'torch==2.2.2'
torch-spec: 'torch==2.2.2 "numpy<2" '
gpu-arch-type: "cuda"
gpu-arch-version: "12.1"
- name: CUDA 2.3
Expand All @@ -38,7 +38,7 @@ jobs:
gpu-arch-version: "12.1"
- name: CPU 2.2.2
runs-on: linux.4xlarge
torch-spec: 'torch==2.2.2 --index-url https://download.pytorch.org/whl/cpu'
torch-spec: 'torch==2.2.2 --index-url https://download.pytorch.org/whl/cpu "numpy<2" '
gpu-arch-type: "cpu"
gpu-arch-version: ""
- name: CPU 2.3
Expand Down

0 comments on commit e5df48e

Please sign in to comment.