🐍 Geometric Computer Vision Library for Spatial AI
Python artificial-intelligencecomputer-visiondeep-learninghacktoberfestimage-processingmachine-learningneural-networkpythonpytorchroboticsspatial-ai
add collector for CI on PR's and remove unused CI (#2379)
João Gustavo A. Amorimc9e546268a6b
diff --git a/.github/actions_info.md b/.github/actions_info.mdindex da969bd0a..1a130be37 100644--- a/.github/actions_info.md+++ b/.github/actions_info.md@@ -33,9 +33,9 @@ Use the actions:Has the inputs:- `os`: (string, default: `ubuntu-latest`) the OS name same as supported by [gha](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#choosing-github-hosted-runners).-- `python-version`: (json list of strings, default: `'["3.8"]'`) a string with+- `python-version`: (json list of strings, default: `'["3.10"]'`) a string withformat of a json list within strings for each python version desired.-- `pytorch-version`: (json list of strings, default: `'["1.9.1"]'`) a string+- `pytorch-version`: (json list of strings, default: `'["2.0.0"]'`) a stringwith format of a json list within strings for each pytorch version desired.- `pytorch-dtype`: (string, default: `float32`) the dtype used to generatethe tests with pytest.@@ -49,7 +49,7 @@ Has the inputs:A matrix strategy will be adopted from the list of python and pytorch version.### Tests tutorials-This workflow ([.github/workflows/tests_tutorials.yml](workflows/tests_tutorials.yml)) will setup+This workflow ([.github/workflows/test_tutorials.yml](workflows/tests_tutorials.yml)) will setupan environment using the [env](#Env) action, clone the [tutorials repo](https://github.com/kornia/tutorials), and execute the tutorials.Use the actions:@@ -66,3 +66,21 @@ Has the inputs:the matrix strategy.A matrix strategy will be adopted from the list of python and pytorch version.++### Tests typing+This workflow ([.github/workflows/test_typing.yml](workflows/test_typing.yml)) will setup+an environment using the [env](#Env) action, run the typing tests using mypy and+uploading the coverage report to codecov.++Use the actions:+- `actions/checkout`+- `.github/actions/env`++Has the inputs:+- `os`: (string, default: `ubuntu-latest`) the OS name same as supported by [gha](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#choosing-github-hosted-runners).+- `python-version`: (json list of strings, default: `'["3.10"]'`) a string with+ format of a json list within strings for each python version desired.+- `pytorch-version`: (json list of strings, default: `'["2.0.0"]'`) a string+ with format of a json list within strings for each pytorch version desired.+- `fail-fast`: (boolean, default: `false`) to set the `fail-fast` behavior on+ the matrix strategy.diff --git a/.github/configurations/changelog-ci-config.json b/.github/configurations/changelog-ci-config.jsondeleted file mode 100644index 2629b507b..000000000--- a/.github/configurations/changelog-ci-config.json+++ /dev/null@@ -1,38 +0,0 @@-{- "comment_changelog": true,- "commit_changelog": false,- "group_config": [- {- "labels": [- "bug",- "bugfix"- ],- "title": "Bug Fixes"- },- {- "labels": [- "improvements",- "enhancement"- ],- "title": "Code Improvements"- },- {- "labels": [- "feature",- "feature request"- ],- "title": "New Features"- },- {- "labels": [- "docs",- "documentation",- "doc"- ],- "title": "Documentation Updates"- }- ],- "header_prefix": "Version:",- "pull_request_title_regex": "^(?i:release)",- "version_regex": "v?([0-9]{1,2})[.]([0-9]{1,2})[.]([0-9]{1,2})\\s\\(\\d{1,2}-\\d{1,2}-\\d{4}\\)"-}diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.ymldeleted file mode 100644index 0914825f2..000000000--- a/.github/workflows/changelog.yml+++ /dev/null@@ -1,18 +0,0 @@-name: Changelog CI--on:- pull_request:- types: [opened, reopened]--jobs:- build:- runs-on: ubuntu-latest- steps:- - uses: actions/[email protected]- - name: Run Changelog CI- uses: saadmk11/[email protected]- with:- changelog_filename: CHANGELOG.md- config_file: .github/configurations/changelog-ci-config.json- env:- GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}diff --git a/.github/workflows/pr_test_cpu.yml b/.github/workflows/pr_test_cpu.ymlindex c5bafa81c..f8217bd45 100644--- a/.github/workflows/pr_test_cpu.yml+++ b/.github/workflows/pr_test_cpu.yml@@ -1,4 +1,4 @@-name: Run tests on CPU+name: Tests on CPU (PR)on:push:@@ -15,7 +15,7 @@ concurrency:jobs:tests-cpu:strategy:- fail-fast: false # TODO: enable it when CI be stable+ fail-fast: false # TODO: enable it when CI be stable (when drop support to torch 1.9.1)matrix:os: ['Ubuntu-latest', 'Windows-latest', 'MacOS-latest']uses: ./.github/workflows/tests.yml@@ -25,33 +25,33 @@ jobs:pytorch-version: '["1.9.1", "2.0.0"]'pytorch-dtype: 'float32'- tests-cpu-old-torch-new-py:- strategy:- fail-fast: false- matrix:- os: ['Ubuntu-latest', 'Windows-latest', 'MacOS-latest']-- uses: ./.github/workflows/tests.yml- with:- os: ${{ matrix.os }}- python-version: '["3.9"]'- pytorch-dtype: 'float32'-tests-cpu-fp64:strategy:fail-fast: true- matrix:- os: ['Ubuntu-latest']uses: ./.github/workflows/tests.ymlwith:- os: ${{ matrix.os }}python-version: '["3.8", "3.10"]'pytorch-version: '["1.9.1", "2.0.0"]'pytorch-dtype: 'float64'+ test-typing:+ uses: ./.github/workflows/test_typing.yml++ test-tutorials:+ uses: ./.github/workflows/test_tutorials.yml++ collector:+ needs: [tests-cpu, tests-cpu-fp64, test-tutorials, test-typing]+ if: always()+ runs-on: ubuntu-latest+ steps:+ - name: check for failures+ if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')+ run: echo job failed && exit 1+tests-nightly:if: contains(github.event.pull_request.labels.*.name, 'nightly')- name: ${{ matrix.os }} - python-${{ matrix.python-version }}, torch-nightly, ${{ matrix.pytorch-dtype }}+ name: ${{ matrix.os }} - torch-nightly, ${{ matrix.pytorch-dtype }}strategy:fail-fast: false@@ -62,28 +62,5 @@ jobs:uses: ./.github/workflows/tests.ymlwith:os: ${{ matrix.os }}- python-version: '["3.10"]'pytorch-version: '["nightly"]'pytorch-dtype: ${{ matrix.pytorch-dtype }}-- tests-tutorials:- strategy:- fail-fast: false- matrix:- os: ['Ubuntu-latest']- uses: ./.github/workflows/tests_tutorials.yml- with:- os: ${{ matrix.os }}- python-version: '["3.10"]'- pytorch-version: '["2.0.0"]'-- # tests-cpu-half:- # strategy:- # fail-fast: false # TODO: enable it when CI be stable- # uses: ./.github/workflows/tests.yml- # with:- # os: 'Ubuntu-latest'- # python-version: '["3.10"]'- # pytorch-version: '["2.0.0"]'- # pytorch-dtype: 'float16'- # continue-on-error: truediff --git a/.github/workflows/pr_test_typing.yml b/.github/workflows/pr_test_typing.ymldeleted file mode 100644index e4de0153c..000000000--- a/.github/workflows/pr_test_typing.yml+++ /dev/null@@ -1,45 +0,0 @@-name: Run typing tests--on:- pull_request:- branches: [master, test-me-*]- types: [opened, reopened, synchronize, ready_for_review]--concurrency:- group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}- cancel-in-progress: true--jobs:- tests:- name: ${{ matrix.os }} - python-${{ matrix.python-version }}, torch-${{ matrix.pytorch-version }}- runs-on: ${{ matrix.os }}-latest-- strategy:- fail-fast: false- matrix:- os: ['Ubuntu']- python-version: ['3.8']- pytorch-version: ['2.0.0']-- steps:- - name: Checkout kornia- uses: actions/checkout@v3-- - name: Setting environment on ${{ matrix.os }} with python ${{ matrix.python-version }} and pytorch ${{ matrix.pytorch-version }}- uses: ./.github/actions/env- with:- python-version: ${{ matrix.python-version }}- pytorch-version: ${{ matrix.pytorch-version }}-- - name: Run typing tests- shell: bash -l {0}- run: mypy --cobertura-xml-report ./-- - if: always()- name: Upload coverage- uses: codecov/codecov-action@v3- with:- file: cobertura.xml- token: ${{ secrets.CODECOV_TOKEN }} # to not depend on build via GH API- flags: typing,${{ matrix.os }}_py-${{ matrix.python-version }}_pt-${{ matrix.pytorch-version }}_${{ matrix.pytorch-dtype }}- name: cpu-coverage-typesdiff --git a/.github/workflows/scheduled_test_cpu.yml b/.github/workflows/scheduled_test_cpu.ymlindex bef18d2b6..6ea40e1ca 100644--- a/.github/workflows/scheduled_test_cpu.yml+++ b/.github/workflows/scheduled_test_cpu.yml@@ -7,7 +7,7 @@ on:- cron: "0 4 * * *"concurrency:- group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}+ group: ${{ github.workflow }}-${{ github.ref }}cancel-in-progress: truejobs:@@ -47,17 +47,10 @@ jobs:uses: ./.github/workflows/tests.ymlwith:os: 'MacOS-latest'- python-version: '["3.10"]'- pytorch-version: '["2.0.0"]'pytorch-dtype: ${{ matrix.pytorch-dtype }}- tests-tutorials:- strategy:- fail-fast: false- matrix:- os: ['Ubuntu-latest']- uses: ./.github/workflows/tests_tutorials.yml- with:- os: ${{ matrix.os }}- python-version: '["3.10"]'- pytorch-version: '["2.0.0"]'+ test-tutorials:+ uses: ./.github/workflows/test_tutorials.yml++ test-typing:+ uses: ./.github/workflows/test_typing.ymldiff --git a/.github/workflows/python_package.yml b/.github/workflows/scheduled_test_pypi_package.ymlsimilarity index 61%rename from .github/workflows/python_package.ymlrename to .github/workflows/scheduled_test_pypi_package.ymlindex 9eb3e8fc3..9344893bf 100644--- a/.github/workflows/python_package.yml+++ b/.github/workflows/scheduled_test_pypi_package.yml@@ -1,4 +1,4 @@-name: Python package+name: Test PyPI packageon:schedule:@@ -21,8 +21,10 @@ jobs:with:python-version: ${{ matrix.python-version }}- - name: Download Kornia binary+ - name: Pip install Kornia+ run: pip install kornia++ - name: Check dependencies and kornia versionrun: |- pip install torch -f https://download.pytorch.org/whl/torch_stable.html- pip install kornia- python -c "import kornia"+ python -c "import torch;print('Pytorch version: ', torch.__version__)"+ python -c "import kornia;print('Kornia version: ', kornia.__version__)"diff --git a/.github/workflows/scheduled_test_typing.yml b/.github/workflows/scheduled_test_typing.ymldeleted file mode 100644index 6a64ace45..000000000--- a/.github/workflows/scheduled_test_typing.yml+++ /dev/null@@ -1,47 +0,0 @@-name: Run typing tests (scheduled)--on:- push:- branches: [master, test-me-*]-- schedule:- - cron: "0 4 * * *"--concurrency:- group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}- cancel-in-progress: true--jobs:- tests:- name: ${{ matrix.os }} - python-${{ matrix.python-version }}, torch-${{ matrix.pytorch-version }}- runs-on: ${{ matrix.os }}-latest-- strategy:- fail-fast: false- matrix:- os: ['Ubuntu']- python-version: ['3.8']- pytorch-version: ['2.0.0']-- steps:- - name: Checkout kornia- uses: actions/checkout@v3-- - name: Setting environment on ${{ matrix.os }} with python ${{ matrix.python-version }} and pytorch ${{ matrix.pytorch-version }}- uses: ./.github/actions/env- with:- python-version: ${{ matrix.python-version }}- pytorch-version: ${{ matrix.pytorch-version }}-- - name: Run typing tests- shell: bash -l {0}- run: mypy --cobertura-xml-report ./-- - if: always()- name: Upload coverage- uses: codecov/codecov-action@v3- with:- file: cobertura.xml- token: ${{ secrets.CODECOV_TOKEN }} # to not depend on build via GH API- flags: typing,${{ matrix.os }}_py-${{ matrix.python-version }}_pt-${{ matrix.pytorch-version }}_${{ matrix.pytorch-dtype }}- name: cpu-coverage-typesdiff --git a/.github/workflows/tests_tutorials.yml b/.github/workflows/test_tutorials.ymlsimilarity index 100%rename from .github/workflows/tests_tutorials.ymlrename to .github/workflows/test_tutorials.ymldiff --git a/.github/workflows/test_typing.yml b/.github/workflows/test_typing.ymlnew file mode 100644index 000000000..bb979c3f0--- /dev/null+++ b/.github/workflows/test_typing.yml@@ -0,0 +1,57 @@+on:+ workflow_call:+ inputs:+ python-version:+ required: false+ type: string+ default: '["3.10"]'+ pytorch-version:+ required: false+ type: string+ default: '["2.0.0"]'+ os:+ required: false+ type: string+ default: ubuntu-latest+ fail-fast:+ required: false+ type: boolean+ default: false++jobs:+ tests-typing:+ name: python-${{ matrix.python-version }}, torch-${{ matrix.pytorch-version }}+ runs-on: ${{ inputs.os }}+ strategy:+ fail-fast: ${{ inputs.fail-fast }}+ matrix:+ python-version: ${{ fromJSON(inputs.python-version) }}+ pytorch-version: ${{ fromJSON(inputs.pytorch-version) }}+ exclude:+ - pytorch-version: '1.9.1'+ python-version: '3.10'+ - pytorch-version: '1.10.2'+ python-version: '3.10'++ steps:+ - name: Checkout kornia+ uses: actions/checkout@v3++ - name: Setting environment on ${{ inputs.os }} with python ${{ matrix.python-version }} and pytorch ${{ matrix.pytorch-version }}+ uses: ./.github/actions/env+ with:+ python-version: ${{ matrix.python-version }}+ pytorch-version: ${{ matrix.pytorch-version }}++ - name: Run typing tests+ shell: bash -l {0}+ run: mypy --cobertura-xml-report ./++ - if: always()+ name: Upload typing coverage+ uses: codecov/codecov-action@v3+ with:+ file: cobertura.xml+ token: ${{ secrets.CODECOV_TOKEN }} # to not depend on build via GH API+ flags: typing,${{ inputs.os }}_py-${{ matrix.python-version }}_pt-${{ matrix.pytorch-version }}_${{ inputs.pytorch-dtype }}+ name: cpu-coverage-typesdiff --git a/.github/workflows/tests.yml b/.github/workflows/tests.ymlindex 5b8d95af7..d4d3e4792 100644--- a/.github/workflows/tests.yml+++ b/.github/workflows/tests.yml@@ -4,11 +4,11 @@ on:python-version:required: falsetype: string- default: '["3.8"]'+ default: '["3.10"]'pytorch-version:required: falsetype: string- default: '["1.9.1"]'+ default: '["2.0.0"]'os:required: falsetype: string@@ -48,6 +48,7 @@ jobs:steps:- name: Checkout korniauses: actions/checkout@v3+- name: Setting environment on ${{ inputs.os }} with python ${{ matrix.python-version }} and pytorch ${{ matrix.pytorch-version }}uses: ./.github/actions/envwith:@@ -59,7 +60,6 @@ jobs:shell: bash -l {0}run: pytest -v --device cpu --dtype ${{ inputs.pytorch-dtype }} ${{ inputs.pytest-extra }} --cov=kornia --cov-report xml ./test-- if: always()name: Upload coverageuses: codecov/codecov-action@v3diff --git a/.github/workflows/tests_cuda.yml b/.github/workflows/tests_cuda.ymldeleted file mode 100644index 96095dc57..000000000--- a/.github/workflows/tests_cuda.yml+++ /dev/null@@ -1,29 +0,0 @@-name: tests-cuda--on:- push:- branches:- - master- pull_request:- branches:- - master- schedule:- - cron: "0 0 * * *"--jobs:- tests-cuda:- container:- image: pytorch/pytorch:1.6.0-cuda10.1-cudnn7-runtime- options: --gpus all- runs-on: [self-hosted, Linux, x64]- steps:- - uses: actions/checkout@v2- - name: Install dependencies- shell: bash -l {0}- run: |- # NOTE: pytorch image does not include git- conda install -c anaconda git- pip install .[dev,x]- - name: Run Tests- shell: bash -l {0}- run: pytest -v --device cuda --dtype float32,float64 ./test