From 94705a952861d8a70ec8be2fb90f3375150a873d Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Tue, 28 Sep 2021 12:28:18 -0700 Subject: [PATCH] Add Hub custom models to CI tests (#4978) * Update ci-testing.yml for Hub custom model tests * Update ci-testing.yml --- .github/workflows/ci-testing.yml | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci-testing.yml b/.github/workflows/ci-testing.yml index 71f39c16c4ed..da695395fe69 100644 --- a/.github/workflows/ci-testing.yml +++ b/.github/workflows/ci-testing.yml @@ -4,10 +4,10 @@ name: CI CPU testing on: # https://help.github.com/en/actions/reference/events-that-trigger-workflows push: - branches: [master] + branches: [ master ] pull_request: # The branches below must be a subset of the branches above - branches: [master] + branches: [ master ] schedule: - cron: '0 0 * * *' # Runs at 00:00 UTC every day @@ -18,9 +18,9 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - python-version: [3.8] - model: ['yolov5s'] # models to test + os: [ ubuntu-latest, macos-latest, windows-latest ] + python-version: [ 3.8 ] + model: [ 'yolov5s' ] # models to test # Timeout: https://stackoverflow.com/a/59076067/4521646 timeout-minutes: 50 @@ -65,19 +65,25 @@ jobs: - name: Tests workflow run: | # export PYTHONPATH="$PWD" # to run '$ python *.py' files in subdirectories - di=cpu # inference devices # define device + di=cpu # device - # train + # Train python train.py --img 128 --batch 16 --weights ${{ matrix.model }}.pt --cfg ${{ matrix.model }}.yaml --epochs 1 --device $di - # detect - python detect.py --weights ${{ matrix.model }}.pt --device $di - python detect.py --weights runs/train/exp/weights/last.pt --device $di - # val + # Val python val.py --img 128 --batch 16 --weights ${{ matrix.model }}.pt --device $di python val.py --img 128 --batch 16 --weights runs/train/exp/weights/last.pt --device $di - + # Detect + python detect.py --weights ${{ matrix.model }}.pt --device $di + python detect.py --weights runs/train/exp/weights/last.pt --device $di python hubconf.py # hub + # Export python models/yolo.py --cfg ${{ matrix.model }}.yaml # build PyTorch model python models/tf.py --weights ${{ matrix.model }}.pt # build TensorFlow model python export.py --img 128 --batch 1 --weights ${{ matrix.model }}.pt --include torchscript onnx # export + # Python + python - <