Skip to content

Commit

Permalink
YAML reformat (#7669)
Browse files Browse the repository at this point in the history
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
  • Loading branch information
glenn-jocher committed Jan 18, 2024
1 parent d021524 commit 63e7db1
Show file tree
Hide file tree
Showing 55 changed files with 725 additions and 756 deletions.
41 changes: 21 additions & 20 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,27 @@ on:
pull_request:
branches: [main]
schedule:
- cron: '0 0 * * *' # runs at 00:00 UTC every day
- cron: "0 0 * * *" # runs at 00:00 UTC every day
workflow_dispatch:
inputs:
hub:
description: 'Run HUB'
description: "Run HUB"
default: false
type: boolean
benchmarks:
description: 'Run Benchmarks'
description: "Run Benchmarks"
default: false
type: boolean
tests:
description: 'Run Tests'
description: "Run Tests"
default: false
type: boolean
gpu:
description: 'Run GPU'
description: "Run GPU"
default: false
type: boolean
conda:
description: 'Run Conda'
description: "Run Conda"
default: false
type: boolean

Expand All @@ -41,15 +41,15 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ['3.11']
python-version: ["3.11"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip' # caching pip dependencies
cache: "pip" # caching pip dependencies
- name: Install requirements
shell: bash # for Windows compatibility
shell: bash # for Windows compatibility
run: |
python -m pip install --upgrade pip wheel
pip install -e . --extra-index-url https://download.pytorch.org/whl/cpu
Expand Down Expand Up @@ -95,16 +95,16 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ['3.11']
python-version: ["3.11"]
model: [yolov8n]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip' # caching pip dependencies
cache: "pip" # caching pip dependencies
- name: Install requirements
shell: bash # for Windows compatibility
shell: bash # for Windows compatibility
run: |
python -m pip install --upgrade pip wheel
pip install -e ".[export]" "coverage[toml]" --extra-index-url https://download.pytorch.org/whl/cpu
Expand Down Expand Up @@ -150,21 +150,22 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ['3.11']
python-version: ["3.11"]
torch: [latest]
include:
- os: ubuntu-latest
python-version: '3.8' # torch 1.8.0 requires python >=3.6, <=3.8
torch: '1.8.0' # min torch version CI https://pypi.org/project/torchvision/
python-version: "3.8" # torch 1.8.0 requires python >=3.6, <=3.8
torch: "1.8.0" # min torch version CI https://pypi.org/project/torchvision/
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip' # caching pip dependencies
cache: "pip" # caching pip dependencies
- name: Install requirements
shell: bash # for Windows compatibility
run: | # CoreML must be installed before export due to protobuf error from AutoInstall
shell: bash # for Windows compatibility
run: |
# CoreML must be installed before export due to protobuf error from AutoInstall
python -m pip install --upgrade pip wheel
torch=""
if [ "${{ matrix.torch }}" == "1.8.0" ]; then
Expand All @@ -176,7 +177,7 @@ jobs:
yolo checks
pip list
- name: Pytest tests
shell: bash # for Windows compatibility
shell: bash # for Windows compatibility
run: |
slow=""
if [[ "${{ github.event_name }}" == "schedule" ]] || [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
Expand Down Expand Up @@ -220,7 +221,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ['3.11']
python-version: ["3.11"]
defaults:
run:
shell: bash -el {0}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/cla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ jobs:
# must be repository secret token
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
with:
path-to-signatures: 'signatures/version1/cla.json'
path-to-document: 'https://docs.ultralytics.com/help/CLA' # CLA document
path-to-signatures: "signatures/version1/cla.json"
path-to-document: "https://docs.ultralytics.com/help/CLA" # CLA document
# branch should not be protected
branch: 'main'
branch: "main"
allowlist: dependabot[bot],github-actions,[pre-commit*,pre-commit*,bot*

remote-organization-name: ultralytics
remote-repository-name: cla
custom-pr-sign-comment: 'I have read the CLA Document and I sign the CLA'
custom-pr-sign-comment: "I have read the CLA Document and I sign the CLA"
custom-allsigned-prcomment: All Contributors have signed the CLA. ✅
#custom-notsigned-prcomment: 'pull request comment with Introductory message to ask new contributors to sign'
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: "CodeQL"

on:
schedule:
- cron: '0 0 1 * *'
- cron: "0 0 1 * *"
workflow_dispatch:

jobs:
Expand All @@ -19,7 +19,7 @@ jobs:
strategy:
fail-fast: false
matrix:
language: ['python']
language: ["python"]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]

steps:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0 # copy full .git directory to access full git history in Docker images
fetch-depth: 0 # copy full .git directory to access full git history in Docker images

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
Expand Down Expand Up @@ -115,12 +115,12 @@ jobs:
-t ultralytics/ultralytics:${{ steps.get_version.outputs.version_tag }} .
- name: Run Tests
if: (github.event_name == 'push' || github.event.inputs[matrix.dockerfile] == 'true') && matrix.platforms == 'linux/amd64' && matrix.dockerfile != 'Dockerfile-conda' # arm64 images not supported on GitHub CI runners
if: (github.event_name == 'push' || github.event.inputs[matrix.dockerfile] == 'true') && matrix.platforms == 'linux/amd64' && matrix.dockerfile != 'Dockerfile-conda' # arm64 images not supported on GitHub CI runners
run: docker run ultralytics/ultralytics:${{ matrix.tags }} /bin/bash -c "pip install pytest && pytest tests"

- name: Run Benchmarks
# WARNING: Dockerfile (GPU) error on TF.js export 'module 'numpy' has no attribute 'object'.
if: (github.event_name == 'push' || github.event.inputs[matrix.dockerfile] == 'true') && matrix.platforms == 'linux/amd64' && matrix.dockerfile != 'Dockerfile' && matrix.dockerfile != 'Dockerfile-conda' # arm64 images not supported on GitHub CI runners
if: (github.event_name == 'push' || github.event.inputs[matrix.dockerfile] == 'true') && matrix.platforms == 'linux/amd64' && matrix.dockerfile != 'Dockerfile' && matrix.dockerfile != 'Dockerfile-conda' # arm64 images not supported on GitHub CI runners
run: docker run ultralytics/ultralytics:${{ matrix.tags }} yolo benchmark model=yolov8n.pt imgsz=160 verbose=0.318

- name: Push Docker Image with Ultralytics version tag
Expand All @@ -139,7 +139,7 @@ jobs:
fi
- name: Notify on failure
if: github.event_name == 'push' && failure() # do not notify on cancelled() as cancelling is performed by hand
if: github.event_name == 'push' && failure() # do not notify on cancelled() as cancelling is performed by hand
uses: slackapi/slack-github-action@v1.24.0
with:
payload: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Run Ultralytics Formatting
uses: ultralytics/actions@main
with:
token: ${{ secrets.GITHUB_TOKEN }} # automatically generated
token: ${{ secrets.GITHUB_TOKEN }} # automatically generated
python: true
docstrings: true
markdown: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ name: Check Broken links
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *' # runs at 00:00 UTC every day
- cron: "0 0 * * *" # runs at 00:00 UTC every day

jobs:
Links:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ jobs:
- name: Set up Python environment
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip' # caching pip dependencies
python-version: "3.11"
cache: "pip" # caching pip dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel build twine
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
name: Close stale issues
on:
schedule:
- cron: '0 0 * * *' # Runs at 00:00 UTC every day
- cron: "0 0 * * *" # Runs at 00:00 UTC every day

jobs:
stale:
Expand Down Expand Up @@ -43,5 +43,5 @@ jobs:
days-before-issue-close: 10
days-before-pr-stale: 90
days-before-pr-close: 30
exempt-issue-labels: 'documentation,tutorial,TODO'
operations-per-run: 300 # The maximum number of operations per run, used to control rate limiting.
exempt-issue-labels: "documentation,tutorial,TODO"
operations-per-run: 300 # The maximum number of operations per run, used to control rate limiting.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Define bot property if installed via https://github.com/marketplace/pre-commit-ci
ci:
autofix_prs: true
autoupdate_commit_msg: '[pre-commit.ci] pre-commit suggestions'
autoupdate_commit_msg: "[pre-commit.ci] pre-commit suggestions"
autoupdate_schedule: monthly
submodules: true

Expand Down Expand Up @@ -55,7 +55,7 @@ repos:
rev: v2.2.6
hooks:
- id: codespell
exclude: 'docs/de|docs/fr|docs/pt|docs/es|docs/mkdocs_de.yml'
exclude: "docs/de|docs/fr|docs/pt|docs/es|docs/mkdocs_de.yml"
args:
- --ignore-words-list=crate,nd,ned,strack,dota,ane,segway,fo,gool,winn,commend,bloc,nam,afterall

Expand All @@ -64,7 +64,7 @@ repos:
hooks:
- id: pycln
args: [--all]

#
# - repo: https://github.com/PyCQA/docformatter
# rev: v1.7.5
# hooks:
Expand Down
10 changes: 4 additions & 6 deletions ultralytics/cfg/datasets/Argoverse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@
# └── datasets
# └── Argoverse ← downloads here (31.5 GB)


# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
path: ../datasets/Argoverse # dataset root dir
train: Argoverse-1.1/images/train/ # train images (relative to 'path') 39384 images
val: Argoverse-1.1/images/val/ # val images (relative to 'path') 15062 images
test: Argoverse-1.1/images/test/ # test images (optional) https://eval.ai/web/challenges/challenge-page/800/overview
path: ../datasets/Argoverse # dataset root dir
train: Argoverse-1.1/images/train/ # train images (relative to 'path') 39384 images
val: Argoverse-1.1/images/val/ # val images (relative to 'path') 15062 images
test: Argoverse-1.1/images/test/ # test images (optional) https://eval.ai/web/challenges/challenge-page/800/overview

# Classes
names:
Expand All @@ -25,7 +24,6 @@ names:
6: traffic_light
7: stop_sign


# Download script/URL (optional) ---------------------------------------------------------------------------------------
download: |
import json
Expand Down
8 changes: 4 additions & 4 deletions ultralytics/cfg/datasets/DOTAv1.5.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
# └── dota1.5 ← downloads here (2GB)

# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
path: ../datasets/DOTAv1.5 # dataset root dir
train: images/train # train images (relative to 'path') 1411 images
val: images/val # val images (relative to 'path') 458 images
test: images/test # test images (optional) 937 images
path: ../datasets/DOTAv1.5 # dataset root dir
train: images/train # train images (relative to 'path') 1411 images
val: images/val # val images (relative to 'path') 458 images
test: images/test # test images (optional) 937 images

# Classes for DOTA 1.5
names:
Expand Down
8 changes: 4 additions & 4 deletions ultralytics/cfg/datasets/DOTAv1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
# └── dota1 ← downloads here (2GB)

# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
path: ../datasets/DOTAv1 # dataset root dir
train: images/train # train images (relative to 'path') 1411 images
val: images/val # val images (relative to 'path') 458 images
test: images/test # test images (optional) 937 images
path: ../datasets/DOTAv1 # dataset root dir
train: images/train # train images (relative to 'path') 1411 images
val: images/val # val images (relative to 'path') 458 images
test: images/test # test images (optional) 937 images

# Classes for DOTA 1.0
names:
Expand Down
4 changes: 1 addition & 3 deletions ultralytics/cfg/datasets/GlobalWheat2020.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
# └── datasets
# └── GlobalWheat2020 ← downloads here (7.0 GB)


# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
path: ../datasets/GlobalWheat2020 # dataset root dir
path: ../datasets/GlobalWheat2020 # dataset root dir
train: # train images (relative to 'path') 3422 images
- images/arvalis_1
- images/arvalis_2
Expand All @@ -30,7 +29,6 @@ test: # test images (optional) 1276 images
names:
0: wheat_head


# Download script/URL (optional) ---------------------------------------------------------------------------------------
download: |
from ultralytics.utils.downloads import download
Expand Down
10 changes: 4 additions & 6 deletions ultralytics/cfg/datasets/ImageNet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@
# └── datasets
# └── imagenet ← downloads here (144 GB)


# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
path: ../datasets/imagenet # dataset root dir
train: train # train images (relative to 'path') 1281167 images
val: val # val images (relative to 'path') 50000 images
test: # test images (optional)
path: ../datasets/imagenet # dataset root dir
train: train # train images (relative to 'path') 1281167 images
val: val # val images (relative to 'path') 50000 images
test: # test images (optional)

# Classes
names:
Expand Down Expand Up @@ -2021,6 +2020,5 @@ map:
n13133613: ear
n15075141: toilet_tissue


# Download script/URL (optional)
download: yolo/data/scripts/get_imagenet.sh
8 changes: 3 additions & 5 deletions ultralytics/cfg/datasets/Objects365.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@
# └── datasets
# └── Objects365 ← downloads here (712 GB = 367G data + 345G zips)


# Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
path: ../datasets/Objects365 # dataset root dir
train: images/train # train images (relative to 'path') 1742289 images
path: ../datasets/Objects365 # dataset root dir
train: images/train # train images (relative to 'path') 1742289 images
val: images/val # val images (relative to 'path') 80000 images
test: # test images (optional)
test: # test images (optional)

# Classes
names:
Expand Down Expand Up @@ -382,7 +381,6 @@ names:
363: Curling
364: Table Tennis


# Download script/URL (optional) ---------------------------------------------------------------------------------------
download: |
from tqdm import tqdm
Expand Down

0 comments on commit 63e7db1

Please sign in to comment.