Update ci-testing.yml streamlined tests (#8809)

* Update ci-testing.yml streamlined tests

* Update ci-testing.yml

* Update ci-testing.yml
This commit is contained in:
Glenn Jocher authored and GitHub committed 2022-07-31 16:12:32 +02:00
1 parent 555976b346
commit 7b72d9a607
1 file changed
+16 -21
+16 -21
View File
@@ -95,27 +95,22 @@ jobs:
shell: bash shell: bash
run: | run: |
# export PYTHONPATH="$PWD" # to run '$ python *.py' files in subdirectories # export PYTHONPATH="$PWD" # to run '$ python *.py' files in subdirectories
d=cpu # device m=${{ matrix.model }} # official weights
model=${{ matrix.model }} b=runs/train/exp/weights/best # best.pt checkpoint
best=runs/train/exp/weights/best.pt python train.py --imgsz 64 --batch 32 --weights $m.pt --cfg $m.yaml --epochs 1 --device cpu # train
# Train for d in cpu; do # devices
python train.py --img 64 --batch 32 --weights $model.pt --cfg $model.yaml --epochs 1 --device $d for w in $m $b; do # weights
# Val python val.py --imgsz 64 --batch 32 --weights $w.pt --device $d # val
python val.py --img 64 --batch 32 --weights $model.pt --device $d python detect.py --imgsz 64 --weights $w.pt --device $d # detect
python val.py --img 64 --batch 32 --weights $best --device $d done
# Detect done
python detect.py --weights $model.pt --device $d python hubconf.py --model $m # hub
python detect.py --weights $best --device $d # python models/tf.py --weights $m.pt # build TF model
python hubconf.py --model $model # hub python models/yolo.py --cfg $m.yaml # build PyTorch model
# Export python export.py --weights $m.pt --img 64 --include torchscript # export
# python models/tf.py --weights $model.pt # build TF model
python models/yolo.py --cfg $model.yaml # build PyTorch model
python export.py --weights $model.pt --img 64 --include torchscript # export
# Python
python - <<EOF python - <<EOF
import torch import torch
model = torch.hub.load('.', 'custom', path='$model', source='local') for path in '$m', '$b':
print(model('data/images/bus.jpg')) model = torch.hub.load('.', 'custom', path=path, source='local')
model = torch.hub.load('.', 'custom', path='$best', source='local') print(model('data/images/bus.jpg'))
print(model('data/images/bus.jpg'))
EOF EOF