File tree Expand file tree Collapse file tree 2 files changed +2
-19
lines changed Expand file tree Collapse file tree 2 files changed +2
-19
lines changed Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff 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-
4932if __name__ == '__main__' :
5033 unittest .main ()
You can’t perform that action at this time.
0 commit comments