|
23 | 23 | model: [ 'yolov5n' ] # models to test |
24 | 24 |
|
25 | 25 | # Timeout: https://stackoverflow.com/a/59076067/4521646 |
26 | | - timeout-minutes: 50 |
| 26 | + timeout-minutes: 60 |
27 | 27 | steps: |
28 | 28 | - uses: actions/checkout@v2 |
29 | 29 | - name: Set up Python ${{ matrix.python-version }} |
@@ -60,35 +60,34 @@ jobs: |
60 | 60 | # - name: W&B login |
61 | 61 | # run: wandb login 345011b3fb26dc8337fd9b20e53857c1d403f2aa |
62 | 62 |
|
63 | | - - name: Download data |
64 | | - run: | |
65 | | - # curl -L -o tmp.zip https://github.com/ultralytics/yolov5/releases/download/v1.0/coco128.zip |
66 | | - # unzip -q tmp.zip -d ../ |
67 | | - # rm tmp.zip |
| 63 | + # - name: Download data |
| 64 | + # run: | |
| 65 | + # curl -L -o tmp.zip https://github.com/ultralytics/yolov5/releases/download/v1.0/coco128.zip |
| 66 | + # unzip -q tmp.zip -d ../datasets |
68 | 67 |
|
69 | 68 | - name: Tests workflow |
70 | 69 | run: | |
71 | 70 | # export PYTHONPATH="$PWD" # to run '$ python *.py' files in subdirectories |
72 | | - di=cpu # device |
| 71 | + d=cpu # device |
| 72 | + weights=runs/train/exp/weights/best.pt |
73 | 73 |
|
74 | 74 | # Train |
75 | | - python train.py --img 64 --batch 32 --weights ${{ matrix.model }}.pt --cfg ${{ matrix.model }}.yaml --epochs 1 --device $di |
| 75 | + python train.py --img 64 --batch 32 --weights ${{ matrix.model }}.pt --cfg ${{ matrix.model }}.yaml --epochs 1 --device $d |
76 | 76 | # Val |
77 | | - python val.py --img 64 --batch 32 --weights ${{ matrix.model }}.pt --device $di |
78 | | - python val.py --img 64 --batch 32 --weights runs/train/exp/weights/last.pt --device $di |
| 77 | + python val.py --img 64 --batch 32 --weights ${{ matrix.model }}.pt --device $d |
| 78 | + python val.py --img 64 --batch 32 --weights $weights --device $d |
79 | 79 | # Detect |
80 | | - python detect.py --weights ${{ matrix.model }}.pt --device $di |
81 | | - python detect.py --weights runs/train/exp/weights/last.pt --device $di |
| 80 | + python detect.py --weights ${{ matrix.model }}.pt --device $d |
| 81 | + python detect.py --weights $weights --device $d |
82 | 82 | python hubconf.py # hub |
83 | 83 | # Export |
84 | 84 | python models/yolo.py --cfg ${{ matrix.model }}.yaml # build PyTorch model |
85 | 85 | python models/tf.py --weights ${{ matrix.model }}.pt # build TensorFlow model |
86 | | - python export.py --img 64 --batch 1 --weights ${{ matrix.model }}.pt --include torchscript onnx # export |
| 86 | + python export.py --weights ${{ matrix.model }}.pt --img 64 --include torchscript onnx # export |
87 | 87 | # Python |
88 | 88 | python - <<EOF |
89 | 89 | import torch |
90 | | - # Known issue, urllib.error.HTTPError: HTTP Error 403: rate limit exceeded, will be resolved in torch==1.10.0 |
91 | | - # model = torch.hub.load('ultralytics/yolov5', 'custom', path='runs/train/exp/weights/last.pt') |
| 90 | + # model = torch.hub.load('ultralytics/yolov5', 'custom', path=$weights) |
92 | 91 | EOF |
93 | 92 |
|
94 | 93 | shell: bash |
0 commit comments