Skip to content

Commit

Permalink
Fix test failures (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdeepali authored Apr 3, 2024
1 parent 8862a9a commit a0bdada
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 8 deletions.
25 changes: 25 additions & 0 deletions lightning/0301-update-requirements.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From 50d6748d7dadf33c935699876786c535c3b8165d Mon Sep 17 00:00:00 2001
From: Deepali Chourasia <deepch23@in.ibm.com>
Date: Tue, 2 Apr 2024 09:07:11 +0000
Subject: [PATCH] update requirements

---
requirements/pytorch/test.txt | 2 --
1 file changed, 2 deletions(-)

diff --git a/requirements/pytorch/test.txt b/requirements/pytorch/test.txt
index 94a06630d..3ba37bb18 100644
--- a/requirements/pytorch/test.txt
+++ b/requirements/pytorch/test.txt
@@ -8,8 +8,6 @@ pytest-random-order ==1.1.0
# needed in tests
cloudpickle >=1.3, <2.3.0
scikit-learn >0.22.1, <1.4.0
-onnx >=0.14.0, <1.15.0
-onnxruntime >=0.15.0, <1.17.0
psutil <5.9.6 # for `DeviceStatsMonitor`
pandas >1.0, <2.2.0 # needed in benchmarks
fastapi # for `ServableModuleValidator` # not setting version as re-defined in App
--
2.40.1

13 changes: 5 additions & 8 deletions tests/open-ce-tests.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
tests:
tests:
- name: Setup PyTorch-Lightning Tests
command: |
Expand All @@ -8,10 +7,10 @@ tests:
git clone https://github.com/PyTorchLightning/pytorch-lightning.git
cd pytorch-lightning
git checkout ${PL_COMMIT}
git apply ${FEEDSTOCK_DIR}/lightning/0301-update-codecov-version.patch
conda install -y scikit-learn=1.1.* regex typed-ast pandas=1.4 scikit-image coverage cryptography psutil
git apply ${FEEDSTOCK_DIR}/lightning/0301-update-requirements.patch
conda install -y scikit-learn=1.3.* regex pandas=1.4 scikit-image coverage cryptography psutil cmake
pip install -r requirements/pytorch/test.txt
pip install sklearn omegaconf rich jsonargparse docstring-parser
pip install omegaconf rich jsonargparse docstring-parser
pip install -U 'jsonargparse[signatures]'
python .actions/assistant.py copy_replace_imports --source_dir="./tests" \
--source_import="lightning.fabric,lightning.pytorch" --target_import="lightning_fabric,pytorch_lightning"
Expand Down Expand Up @@ -39,14 +38,13 @@ tests:
git clone https://github.com/PyTorchLightning/torchmetrics.git
cd torchmetrics
git checkout v${METRICS_VERSION}
git apply ${FEEDSTOCK_DIR}/metrics/0301-fix-for-tests.patch
ARCH=$(arch)
if test "${ARCH}" == "x86_64"
then
ARCH="64"
fi
conda install -y scikit-learn=1.1.* regex typed-ast scikit-image nltk gcc_linux-${ARCH} coverage cryptography pandas scipy unzip
pip install -r requirements/test.txt
conda install -y scikit-learn=1.3.* regex scikit-image nltk gcc_linux-${ARCH} coverage cryptography pandas scipy unzip
pip install -r requirements/_tests.txt
pip install torch-fidelity pycocotools
cd tests
python -c "from urllib.request import urlretrieve ; urlretrieve('https://pl-public-data.s3.amazonaws.com/metrics/data.zip', 'data.zip')"
Expand All @@ -58,7 +56,6 @@ tests:
TESTSUITES_TO_RUN=(
tests/unittests/bases/test_aggregation.py
tests/unittests/classification/test_accuracy.py
tests/unittests/detection/test_map.py
tests/unittests/regression/test_r2.py
tests/unittests/retrieval/test_ndcg.py
)
Expand Down

0 comments on commit a0bdada

Please sign in to comment.