diff --git a/.github/workflows/ci-tests-fabric.yml b/.github/workflows/ci-tests-fabric.yml index 882fea6c965c6..47b724ca4a788 100644 --- a/.github/workflows/ci-tests-fabric.yml +++ b/.github/workflows/ci-tests-fabric.yml @@ -85,11 +85,9 @@ jobs: - name: Append Env. vars for Linux if: ${{ runner.os == 'Linux' }} run: echo "GLOO_SOCKET_IFNAME=eth0" >> $GITHUB_ENV - - name: Append Env. vars for MacOS if: ${{ runner.os == 'macOS' }} run: echo "GLOO_SOCKET_IFNAME=lo0" >> $GITHUB_ENV - - name: Append Env. vars for Windows if: ${{ runner.os == 'windows' }} run: | @@ -134,6 +132,11 @@ jobs: --find-links="${TORCH_URL}" uv pip list + - name: Patch NumPy for old Torch versions + if: ${{ startsWith(matrix.config.pytorch-version, '2.1') || startsWith(matrix.config.pytorch-version, '2.2') || startsWith(matrix.config.pytorch-version, '2.3') }} + # Patch numpy to avoid "RuntimeError: Numpy is not available" + run: uv pip install -U "numpy<1.24" + - name: Dump handy wheels if: github.event_name == 'push' && github.ref == 'refs/heads/master' continue-on-error: true diff --git a/.github/workflows/ci-tests-pytorch.yml b/.github/workflows/ci-tests-pytorch.yml index 168a6783514c3..56c025a86de93 100644 --- a/.github/workflows/ci-tests-pytorch.yml +++ b/.github/workflows/ci-tests-pytorch.yml @@ -90,7 +90,6 @@ jobs: - name: Append Env. vars for Linux if: ${{ runner.os == 'Linux' }} run: echo "GLOO_SOCKET_IFNAME=eth0" >> $GITHUB_ENV - - name: Append Env. vars for MacOS if: ${{ runner.os == 'macOS' }} run: echo "GLOO_SOCKET_IFNAME=lo0" >> $GITHUB_ENV @@ -138,6 +137,11 @@ jobs: --find-links="https://download.pytorch.org/whl/torch-tensorrt" uv pip list + - name: Patch NumPy for old Torch versions + if: ${{ startsWith(matrix.config.pytorch-version, '2.1') || startsWith(matrix.config.pytorch-version, '2.2') || startsWith(matrix.config.pytorch-version, '2.3') }} + # Patch numpy to avoid "RuntimeError: Numpy is not available" + run: uv pip install -U "numpy<1.24" + - name: Drop LAI from extensions if: ${{ matrix.config.pkg-name != 'lightning' }} # Lightning is dependency of Habana or other accelerators/integrations so in case we test PL we need to remove it diff --git a/requirements/fabric/test.txt b/requirements/fabric/test.txt index fd1f1b1c76397..e4090ab0a30da 100644 --- a/requirements/fabric/test.txt +++ b/requirements/fabric/test.txt @@ -1,5 +1,4 @@ coverage ==7.10.6 -numpy >=1.21.0, <1.27.0 pytest ==8.4.2 pytest-cov ==6.3.0 pytest-timeout ==2.4.0 diff --git a/requirements/pytorch/test.txt b/requirements/pytorch/test.txt index d60e5f7ddf577..126ac09ce2df8 100644 --- a/requirements/pytorch/test.txt +++ b/requirements/pytorch/test.txt @@ -8,7 +8,6 @@ pytest-random-order ==1.2.0 # needed in tests cloudpickle >=1.3, <3.2.0 scikit-learn >0.22.1, <1.8.0 -numpy >1.20.0, <1.27.0 onnx >1.12.0, <1.20.0 onnxruntime >=1.12.0, <1.23.0 onnxscript >= 0.1.0, < 0.5.0