Update workflows (#6427)
* Workflow updates * quotes fix * best to weights fix
This commit is contained in:
parent
16563ac5b5
commit
ff8646cdea
|
|
@ -23,7 +23,7 @@ jobs:
|
||||||
model: [ 'yolov5n' ] # models to test
|
model: [ 'yolov5n' ] # models to test
|
||||||
|
|
||||||
# Timeout: https://stackoverflow.com/a/59076067/4521646
|
# Timeout: https://stackoverflow.com/a/59076067/4521646
|
||||||
timeout-minutes: 50
|
timeout-minutes: 60
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Set up Python ${{ matrix.python-version }}
|
- name: Set up Python ${{ matrix.python-version }}
|
||||||
|
|
@ -60,35 +60,34 @@ jobs:
|
||||||
# - name: W&B login
|
# - name: W&B login
|
||||||
# run: wandb login 345011b3fb26dc8337fd9b20e53857c1d403f2aa
|
# run: wandb login 345011b3fb26dc8337fd9b20e53857c1d403f2aa
|
||||||
|
|
||||||
- name: Download data
|
# - name: Download data
|
||||||
run: |
|
# run: |
|
||||||
# curl -L -o tmp.zip https://github.com/ultralytics/yolov5/releases/download/v1.0/coco128.zip
|
# curl -L -o tmp.zip https://github.com/ultralytics/yolov5/releases/download/v1.0/coco128.zip
|
||||||
# unzip -q tmp.zip -d ../
|
# unzip -q tmp.zip -d ../datasets
|
||||||
# rm tmp.zip
|
|
||||||
|
|
||||||
- name: Tests workflow
|
- name: Tests workflow
|
||||||
run: |
|
run: |
|
||||||
# export PYTHONPATH="$PWD" # to run '$ python *.py' files in subdirectories
|
# export PYTHONPATH="$PWD" # to run '$ python *.py' files in subdirectories
|
||||||
di=cpu # device
|
d=cpu # device
|
||||||
|
weights=runs/train/exp/weights/best.pt
|
||||||
|
|
||||||
# Train
|
# Train
|
||||||
python train.py --img 64 --batch 32 --weights ${{ matrix.model }}.pt --cfg ${{ matrix.model }}.yaml --epochs 1 --device $di
|
python train.py --img 64 --batch 32 --weights ${{ matrix.model }}.pt --cfg ${{ matrix.model }}.yaml --epochs 1 --device $d
|
||||||
# Val
|
# Val
|
||||||
python val.py --img 64 --batch 32 --weights ${{ matrix.model }}.pt --device $di
|
python val.py --img 64 --batch 32 --weights ${{ matrix.model }}.pt --device $d
|
||||||
python val.py --img 64 --batch 32 --weights runs/train/exp/weights/last.pt --device $di
|
python val.py --img 64 --batch 32 --weights $weights --device $d
|
||||||
# Detect
|
# Detect
|
||||||
python detect.py --weights ${{ matrix.model }}.pt --device $di
|
python detect.py --weights ${{ matrix.model }}.pt --device $d
|
||||||
python detect.py --weights runs/train/exp/weights/last.pt --device $di
|
python detect.py --weights $weights --device $d
|
||||||
python hubconf.py # hub
|
python hubconf.py # hub
|
||||||
# Export
|
# Export
|
||||||
python models/yolo.py --cfg ${{ matrix.model }}.yaml # build PyTorch model
|
python models/yolo.py --cfg ${{ matrix.model }}.yaml # build PyTorch model
|
||||||
python models/tf.py --weights ${{ matrix.model }}.pt # build TensorFlow model
|
python models/tf.py --weights ${{ matrix.model }}.pt # build TensorFlow model
|
||||||
python export.py --img 64 --batch 1 --weights ${{ matrix.model }}.pt --include torchscript onnx # export
|
python export.py --weights ${{ matrix.model }}.pt --img 64 --include torchscript onnx # export
|
||||||
# Python
|
# Python
|
||||||
python - <<EOF
|
python - <<EOF
|
||||||
import torch
|
import torch
|
||||||
# Known issue, urllib.error.HTTPError: HTTP Error 403: rate limit exceeded, will be resolved in torch==1.10.0
|
# model = torch.hub.load('ultralytics/yolov5', 'custom', path=$weights)
|
||||||
# model = torch.hub.load('ultralytics/yolov5', 'custom', path='runs/train/exp/weights/last.pt')
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
|
||||||
|
|
@ -12,12 +12,12 @@ jobs:
|
||||||
with:
|
with:
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
pr-message: |
|
pr-message: |
|
||||||
👋 Hello @${{ github.actor }}, thank you for submitting a 🚀 PR! To allow your work to be integrated as seamlessly as possible, we advise you to:
|
👋 Hello @${{ github.actor }}, thank you for submitting a YOLOv5 🚀 PR! To allow your work to be integrated as seamlessly as possible, we advise you to:
|
||||||
- ✅ Verify your PR is **up-to-date with upstream/master.** If your PR is behind upstream/master an automatic [GitHub actions](https://github.com/ultralytics/yolov5/blob/master/.github/workflows/rebase.yml) rebase may be attempted by including the /rebase command in a comment body, or by running the following code, replacing 'feature' with the name of your local branch:
|
- ✅ Verify your PR is **up-to-date with upstream/master.** If your PR is behind upstream/master an automatic [GitHub Actions](https://github.com/ultralytics/yolov5/blob/master/.github/workflows/rebase.yml) merge may be attempted by writing /rebase in a new comment, or by running the following code, replacing 'feature' with the name of your local branch:
|
||||||
```bash
|
```bash
|
||||||
git remote add upstream https://github.com/ultralytics/yolov5.git
|
git remote add upstream https://github.com/ultralytics/yolov5.git
|
||||||
git fetch upstream
|
git fetch upstream
|
||||||
git checkout feature # <----- replace 'feature' with local branch name
|
# git checkout feature # <--- replace 'feature' with local branch name
|
||||||
git merge upstream/master
|
git merge upstream/master
|
||||||
git push -u origin -f
|
git push -u origin -f
|
||||||
```
|
```
|
||||||
|
|
@ -35,7 +35,7 @@ jobs:
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
[**Python>=3.6.0**](https://www.python.org/) with all [requirements.txt](https://github.com/ultralytics/yolov5/blob/master/requirements.txt) installed including [**PyTorch>=1.7**](https://pytorch.org/get-started/locally/). To get started:
|
[**Python>=3.7.0**](https://www.python.org/) with all [requirements.txt](https://github.com/ultralytics/yolov5/blob/master/requirements.txt) installed including [**PyTorch>=1.7**](https://pytorch.org/get-started/locally/). To get started:
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/ultralytics/yolov5 # clone
|
git clone https://github.com/ultralytics/yolov5 # clone
|
||||||
cd yolov5
|
cd yolov5
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
name: Close stale issues
|
name: Close stale issues
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 0 * * *"
|
- cron: '0 0 * * *' # Runs at 00:00 UTC every day
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
stale:
|
stale:
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ See the [YOLOv5 Docs](https://docs.ultralytics.com) for full documentation on tr
|
||||||
<summary>Install</summary>
|
<summary>Install</summary>
|
||||||
|
|
||||||
Clone repo and install [requirements.txt](https://github.com/ultralytics/yolov5/blob/master/requirements.txt) in a
|
Clone repo and install [requirements.txt](https://github.com/ultralytics/yolov5/blob/master/requirements.txt) in a
|
||||||
[**Python>=3.6.0**](https://www.python.org/) environment, including
|
[**Python>=3.7.0**](https://www.python.org/) environment, including
|
||||||
[**PyTorch>=1.7**](https://pytorch.org/get-started/locally/).
|
[**PyTorch>=1.7**](https://pytorch.org/get-started/locally/).
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue