glenn-jocher commited on
Commit
ff8646c
β€’
1 Parent(s): 16563ac

Update workflows (#6427)

Browse files

* Workflow updates

* quotes fix

* best to weights fix

.github/workflows/ci-testing.yml CHANGED
@@ -23,7 +23,7 @@ jobs:
23
  model: [ 'yolov5n' ] # models to test
24
 
25
  # Timeout: https://stackoverflow.com/a/59076067/4521646
26
- timeout-minutes: 50
27
  steps:
28
  - uses: actions/checkout@v2
29
  - name: Set up Python ${{ matrix.python-version }}
@@ -60,35 +60,34 @@ jobs:
60
  # - name: W&B login
61
  # run: wandb login 345011b3fb26dc8337fd9b20e53857c1d403f2aa
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
68
 
69
  - name: Tests workflow
70
  run: |
71
  # export PYTHONPATH="$PWD" # to run '$ python *.py' files in subdirectories
72
- di=cpu # device
 
73
 
74
  # Train
75
- python train.py --img 64 --batch 32 --weights ${{ matrix.model }}.pt --cfg ${{ matrix.model }}.yaml --epochs 1 --device $di
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
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
82
  python hubconf.py # hub
83
  # Export
84
  python models/yolo.py --cfg ${{ matrix.model }}.yaml # build PyTorch model
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
87
  # Python
88
  python - <<EOF
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')
92
  EOF
93
 
94
  shell: bash
 
23
  model: [ 'yolov5n' ] # models to test
24
 
25
  # Timeout: https://stackoverflow.com/a/59076067/4521646
26
+ timeout-minutes: 60
27
  steps:
28
  - uses: actions/checkout@v2
29
  - name: Set up Python ${{ matrix.python-version }}
 
60
  # - name: W&B login
61
  # run: wandb login 345011b3fb26dc8337fd9b20e53857c1d403f2aa
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 ../datasets
 
67
 
68
  - name: Tests workflow
69
  run: |
70
  # export PYTHONPATH="$PWD" # to run '$ python *.py' files in subdirectories
71
+ d=cpu # device
72
+ weights=runs/train/exp/weights/best.pt
73
 
74
  # Train
75
+ python train.py --img 64 --batch 32 --weights ${{ matrix.model }}.pt --cfg ${{ matrix.model }}.yaml --epochs 1 --device $d
76
  # Val
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
  # Detect
80
+ python detect.py --weights ${{ matrix.model }}.pt --device $d
81
+ python detect.py --weights $weights --device $d
82
  python hubconf.py # hub
83
  # Export
84
  python models/yolo.py --cfg ${{ matrix.model }}.yaml # build PyTorch model
85
  python models/tf.py --weights ${{ matrix.model }}.pt # build TensorFlow model
86
+ python export.py --weights ${{ matrix.model }}.pt --img 64 --include torchscript onnx # export
87
  # Python
88
  python - <<EOF
89
  import torch
90
+ # model = torch.hub.load('ultralytics/yolov5', 'custom', path=$weights)
 
91
  EOF
92
 
93
  shell: bash
.github/workflows/greetings.yml CHANGED
@@ -12,12 +12,12 @@ jobs:
12
  with:
13
  repo-token: ${{ secrets.GITHUB_TOKEN }}
14
  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:
17
  ```bash
18
  git remote add upstream https://github.com/ultralytics/yolov5.git
19
  git fetch upstream
20
- git checkout feature # <----- replace 'feature' with local branch name
21
  git merge upstream/master
22
  git push -u origin -f
23
  ```
@@ -35,7 +35,7 @@ jobs:
35
 
36
  ## Requirements
37
 
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:
39
  ```bash
40
  git clone https://github.com/ultralytics/yolov5 # clone
41
  cd yolov5
 
12
  with:
13
  repo-token: ${{ secrets.GITHUB_TOKEN }}
14
  pr-message: |
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:
17
  ```bash
18
  git remote add upstream https://github.com/ultralytics/yolov5.git
19
  git fetch upstream
20
+ # git checkout feature # <--- replace 'feature' with local branch name
21
  git merge upstream/master
22
  git push -u origin -f
23
  ```
 
35
 
36
  ## Requirements
37
 
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:
39
  ```bash
40
  git clone https://github.com/ultralytics/yolov5 # clone
41
  cd yolov5
.github/workflows/stale.yml CHANGED
@@ -3,7 +3,7 @@
3
  name: Close stale issues
4
  on:
5
  schedule:
6
- - cron: "0 0 * * *"
7
 
8
  jobs:
9
  stale:
 
3
  name: Close stale issues
4
  on:
5
  schedule:
6
+ - cron: '0 0 * * *' # Runs at 00:00 UTC every day
7
 
8
  jobs:
9
  stale:
README.md CHANGED
@@ -63,7 +63,7 @@ See the [YOLOv5 Docs](https://docs.ultralytics.com) for full documentation on tr
63
  <summary>Install</summary>
64
 
65
  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
67
  [**PyTorch>=1.7**](https://pytorch.org/get-started/locally/).
68
 
69
  ```bash
 
63
  <summary>Install</summary>
64
 
65
  Clone repo and install [requirements.txt](https://github.com/ultralytics/yolov5/blob/master/requirements.txt) in a
66
+ [**Python>=3.7.0**](https://www.python.org/) environment, including
67
  [**PyTorch>=1.7**](https://pytorch.org/get-started/locally/).
68
 
69
  ```bash