From a136c0fc2a4cf96b744d77a27aad9e0f8be17ff8 Mon Sep 17 00:00:00 2001 From: aimspot Date: Wed, 14 Feb 2024 12:01:51 +0200 Subject: [PATCH] fix-unit test --- .github/workflows/unit-test.yaml | 6 +++--- ODRS/train_utils/config/custom_config.yaml | 2 +- tests/unit_test.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/unit-test.yaml b/.github/workflows/unit-test.yaml index 6ae51ad..c05e9b0 100644 --- a/.github/workflows/unit-test.yaml +++ b/.github/workflows/unit-test.yaml @@ -22,9 +22,9 @@ jobs: - name: Download dataset run: | cd user_datasets - mkdir aeral - cd aeral - curl -L "https://public.roboflow.com/ds/et6MNsOwMJ?key=GMSDIzpYnW" > roboflow.zip; unzip roboflow.zip; rm roboflow.zip + git clone https://github.com/AIRI-Institute/WaRP + mkdir WaRP/Warp-D/valid + cp -r WaRP/Warp-D/test/* WaRP/Warp-D/valid/ - name: Test run: | python tests/unit_test.py diff --git a/ODRS/train_utils/config/custom_config.yaml b/ODRS/train_utils/config/custom_config.yaml index b34eeab..ec4725f 100755 --- a/ODRS/train_utils/config/custom_config.yaml +++ b/ODRS/train_utils/config/custom_config.yaml @@ -1,7 +1,7 @@ BATCH_SIZE: 20 CLASSES: classes.txt DATA_PATH: /home/runner/work/ODRS/ODRS/user_datasets/WaRP/Warp-D -EPOCHS: 2 +EPOCHS: 1 GPU_COUNT: 1 IMG_SIZE: 300 MODEL: yolov8s diff --git a/tests/unit_test.py b/tests/unit_test.py index c0515d1..7c64799 100644 --- a/tests/unit_test.py +++ b/tests/unit_test.py @@ -8,7 +8,7 @@ class TestDatasetInfo(unittest.TestCase): def test_dataset_info(self): - dataset_path = "/home/runner/work/ODRS/ODRS/user_datasets/yolo/aeral" + dataset_path = "/home/runner/work/ODRS/ODRS/user_datasets/WaRP/Warp-D" classes_path = "/home/runner/work/ODRS/ODRS/classes.txt" result = dataset_info(dataset_path, classes_path) @@ -22,7 +22,7 @@ def test_dataset_info(self): self.assertIsInstance(result[4], float) def test_process_directory_img(self): - test_dir = "/home/runner/work/ODRS/ODRS/user_datasets/yolo/aeral/test" + test_dir = "/home/runner/work/ODRS/ODRS/user_datasets/yolo/WaRP/Warp-D/test" os.makedirs(test_dir, exist_ok=True) label_path = os.path.join(test_dir, 'labels')