Skip to content

Commit

Permalink
create summary
Browse files Browse the repository at this point in the history
  • Loading branch information
mikel.brostrom committed Mar 2, 2024
1 parent 3fdbcd4 commit 2b967aa
Show file tree
Hide file tree
Showing 7 changed files with 110 additions and 41 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/evolve.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ on:
- master

jobs:
test-tracking-methods:
test-evolution:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest] # skip windows-latest for
python-version: ['3.11']
outputs:
status: ${{ job.status }}

# Timeout: https://stackoverflow.com/a/59076067/4521646
timeout-minutes: 50
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/mot-metrics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ on:
- master

jobs:
test-tracking-methods:
test-mot-metrics:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest] # skip windows-latest for
python-version: ['3.11']
outputs:
status: ${{ job.status }}

# Timeout: https://stackoverflow.com/a/59076067/4521646
timeout-minutes: 50
Expand Down
26 changes: 14 additions & 12 deletions .github/workflows/pose-tracking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,18 @@ on:
jobs:
test-tracking-with-pose:
runs-on: ubuntu-latest
outputs:
status: ${{ job.status }}
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- run: |
python -m pip install --upgrade pip setuptools wheel
pip install -e . --extra-index-url https://download.pytorch.org/whl/cpu
- name: Test tracking with pose models
env:
IMG: ./assets/MOT17-mini/train/MOT17-02-FRCNN/img1/000001.jpg
run: python examples/track.py --yolo-model weights/yolov8n-pose.pt --source $IMG --imgsz 320
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- run: |
python -m pip install --upgrade pip setuptools wheel
pip install -e . --extra-index-url https://download.pytorch.org/whl/cpu
- name: Test tracking with pose models
env:
IMG: ./assets/MOT17-mini/train/MOT17-02-FRCNN/img1/000001.jpg
run: python examples/track.py --yolo-model weights/yolov8n-pose.pt --source $IMG --imgsz 320
30 changes: 17 additions & 13 deletions .github/workflows/seg-tracking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,21 @@ on:
jobs:
test-tracking-with-seg:
runs-on: ubuntu-latest
outputs:
status: ${{ job.status }}
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -e . --extra-index-url https://download.pytorch.org/whl/cpu
- name: Test tracking with seg models
env:
IMG: ./assets/MOT17-mini/train/MOT17-02-FRCNN/img1/000001.jpg
run: python examples/track.py --tracking-method deepocsort --yolo-model yolov8n-seg.pt --source $IMG
- id: set_result
run: echo "::set-output name=result::success"
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -e . --extra-index-url https://download.pytorch.org/whl/cpu
- name: Test tracking with seg models
env:
IMG: ./assets/MOT17-mini/train/MOT17-02-FRCNN/img1/000001.jpg
run: python examples/track.py --tracking-method deepocsort --yolo-model yolov8n-seg.pt --source $IMG
56 changes: 56 additions & 0 deletions .github/workflows/summary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# name of the workflow, what it is doing (optional)
name: Create summary

# events that trigger the workflow (required)
on:
push:
# pushes to the following branches
branches:
- master
pull_request:
# pull request where master is target
branches:
- master


jobs:
create-summary:
needs:
- test-tracking-methods
- test-mot-metrics
- test-evolution
- test-tracking-with-pose
- test-tracking-with-seg
- test-tracking-methods
if: always() # This ensures the job runs regardless of previous job failures
runs-on: ubuntu-latest
steps:
- name: Prepare environment variables
run: |
echo "test-tracking-methods_STATUS=${{ needs.test-tracking-methods.result }}" >> $GITHUB_ENV
echo "test-mot-metrics_STATUS=${{ needs.test-mot-metrics.result }}" >> $GITHUB_ENV
echo "test-evolution_STATUS=${{ needs.test-evolution.result }}" >> $GITHUB_ENV
echo "test-tracking-with-pose_STATUS=${{ needs.test-tracking-with-pose.result }}" >> $GITHUB_ENV
echo "test-tracking-with-seg_STATUS=${{ needs.test-tracking-with-seg.result }}" >> $GITHUB_ENV
echo "test-tracking-methods_STATUS=${{ needs.test-tracking-methods.result }}" >> $GITHUB_ENV
# Repeat for additional jobs
- name: Check for failures and create summary
run: |
summary=""
failed=false
# Print all environment variables, grep for those ending with _STATUS, then loop
for var in $(printenv | grep '_STATUS$'); do
job_status="${var##*=}" # Extract the status part
job_name="${var%%=*}" # Extract the job name part
if [[ "$job_status" != "success" ]]; then
summary+="$job_name failed with status: $job_status\n"
failed=true
fi
done
if [[ "$failed" = false ]]; then
summary="All jobs succeeded."
fi
echo "Summary: $summary"
28 changes: 15 additions & 13 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,20 @@ env:
jobs:
test-tests:
runs-on: ubuntu-latest
outputs:
status: ${{ job.status }}
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- run:
python -m pip install --upgrade pip setuptools wheel
pip install -e . pytest pytest-cov --extra-index-url https://download.pytorch.org/whl/cpu
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- run:
python -m pip install --upgrade pip setuptools wheel
pip install -e . pytest pytest-cov --extra-index-url https://download.pytorch.org/whl/cpu

- name: Pytest tests # after tracking options as this does not download models
shell: bash # for Windows compatibility
run: |
pytest --cov=$PACKAGE_DIR --cov-report=html -v tests
coverage report --fail-under=$COVERAGE_FAIL_UNDER
- name: Pytest tests # after tracking options as this does not download models
shell: bash # for Windows compatibility
run: |
pytest --cov=$PACKAGE_DIR --cov-report=html -v tests
coverage report --fail-under=$COVERAGE_FAIL_UNDER
3 changes: 2 additions & 1 deletion .github/workflows/tracking-methods.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ on:
jobs:
test-tracking-methods:
runs-on: ${{ matrix.os }}
outputs:
status: ${{ job.status }}
strategy:
fail-fast: false
matrix:
Expand All @@ -32,7 +34,6 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
cache: 'pip' # caching pip dependencies

- name: Install requirements
shell: bash # for Windows compatibility
run: |
Expand Down

0 comments on commit 2b967aa

Please sign in to comment.