Skip to content

Commit 4618cd8

Browse files
authored
Update workflows (ultralytics#6427)
* Workflow updates * quotes fix * best to weights fix
1 parent e1abc05 commit 4618cd8

File tree

4 files changed

+20
-21
lines changed

4 files changed

+20
-21
lines changed

.github/workflows/ci-testing.yml

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
model: [ 'yolov5n' ] # models to test
2424

2525
# Timeout: https://stackoverflow.com/a/59076067/4521646
26-
timeout-minutes: 50
26+
timeout-minutes: 60
2727
steps:
2828
- uses: actions/checkout@v2
2929
- name: Set up Python ${{ matrix.python-version }}
@@ -60,35 +60,34 @@ jobs:
6060
# - name: W&B login
6161
# run: wandb login 345011b3fb26dc8337fd9b20e53857c1d403f2aa
6262

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
6867

6968
- name: Tests workflow
7069
run: |
7170
# 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
7373
7474
# 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
7676
# 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
7979
# 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
8282
python hubconf.py # hub
8383
# Export
8484
python models/yolo.py --cfg ${{ matrix.model }}.yaml # build PyTorch model
8585
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
8787
# Python
8888
python - <<EOF
8989
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)
9291
EOF
9392
9493
shell: bash

.github/workflows/greetings.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ jobs:
1212
with:
1313
repo-token: ${{ secrets.GITHUB_TOKEN }}
1414
pr-message: |
15-
👋 Hello @${{ github.actor }}, thank you for submitting a 🚀 PR! To allow your work to be integrated as seamlessly as possible, we advise you to:
16-
- ✅ 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:
15+
👋 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:
16+
- ✅ 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:
1717
```bash
1818
git remote add upstream https://github.com/ultralytics/yolov5.git
1919
git fetch upstream
20-
git checkout feature # <----- replace 'feature' with local branch name
20+
# git checkout feature # <--- replace 'feature' with local branch name
2121
git merge upstream/master
2222
git push -u origin -f
2323
```
@@ -35,7 +35,7 @@ jobs:
3535
3636
## Requirements
3737
38-
[**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:
38+
[**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:
3939
```bash
4040
git clone https://github.com/ultralytics/yolov5 # clone
4141
cd yolov5

.github/workflows/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
name: Close stale issues
44
on:
55
schedule:
6-
- cron: "0 0 * * *"
6+
- cron: '0 0 * * *' # Runs at 00:00 UTC every day
77

88
jobs:
99
stale:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ See the [YOLOv5 Docs](https://docs.ultralytics.com) for full documentation on tr
6363
<summary>Install</summary>
6464

6565
Clone repo and install [requirements.txt](https://github.com/ultralytics/yolov5/blob/master/requirements.txt) in a
66-
[**Python>=3.6.0**](https://www.python.org/) environment, including
66+
[**Python>=3.7.0**](https://www.python.org/) environment, including
6767
[**PyTorch>=1.7**](https://pytorch.org/get-started/locally/).
6868

6969
```bash

0 commit comments

Comments
 (0)