Skip to content

Commit 64bf5b2

Browse files
refactored ci and tests finally
1 parent 1c65a23 commit 64bf5b2

File tree

2 files changed

+2
-19
lines changed

2 files changed

+2
-19
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
- name: Run Pipeline in Docker Container
3737
run: |
3838
docker run --rm \
39-
-v "${{ runner.os }}/input_raw:/usr/src/app/input_raw" \
40-
-v "${{ runner.os }}/output:/usr/src/app/output" \
39+
-v "${{ github.workspace }}/input_raw:/usr/src/app/input_raw" \
40+
-v "${{ github.workspace }}/output:/usr/src/app/output" \
4141
-e INPUT_DIR=input_raw \
4242
classifier

test_main.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -29,22 +29,5 @@ def test_image_type(self):
2929
print(img_shape, img_type)
3030
self.assertNotEqual(img_type, int, 'Equal Image Type')
3131

32-
def test_image_class(self):
33-
input_dir = "input_raw"
34-
resized_image_path = os.path.join(input_dir, "image.jpg")
35-
output_dir = "output_raw"
36-
os.makedirs(output_dir, exist_ok=True) # Create output_raw if it doesn't exist
37-
output_file_path = os.path.join(output_dir, "output_prediction.txt")
38-
39-
model = MobileNetV2()
40-
model.load_state_dict(torch.load("./model/weights/mobilenetv2.pt", weights_only=True)) # weights ported from torchvision
41-
model.float()
42-
43-
predicted_label = main.inference(model, resized_image_path,
44-
output_file_path)
45-
46-
print('Label in output:',predicted_label)
47-
self.assertNotEqual(predicted_label, 'House', 'Correct classification')
48-
4932
if __name__ == '__main__':
5033
unittest.main()

0 commit comments

Comments
 (0)