forked from kornia/kornia
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use cached weights for scheduled tests
- Loading branch information
Showing
2 changed files
with
71 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ jobs: | |
outputs: | ||
hash: ${{ steps.hashid.outputs.weights-hash }} | ||
steps: | ||
- uses: kornia/workflows/.github/actions/env@v1.11.0 | ||
- uses: kornia/workflows/.github/actions/env@v1.12.0 | ||
- uses: actions/cache@v4 | ||
id: cache-weights | ||
with: | ||
|
@@ -43,8 +43,7 @@ jobs: | |
os: ['Ubuntu-latest', 'Windows-latest'] | ||
pytorch-dtype: ['float32', 'float64'] | ||
|
||
# TODO: release this workflow | ||
uses: kornia/workflows/.github/workflows/tests.yml@main | ||
uses: kornia/workflows/.github/workflows/[email protected] | ||
with: | ||
os: ${{ matrix.os }} | ||
python-version: '["3.8", "3.12"]' | ||
|
@@ -57,7 +56,8 @@ jobs: | |
model-weights- | ||
tests-cpu-macos: | ||
uses: kornia/workflows/.github/workflows/tests.yml@main | ||
needs: [pre-tests] | ||
uses: kornia/workflows/.github/workflows/[email protected] | ||
with: | ||
os: 'MacOS-latest' | ||
python-version: '["3.8", "3.12"]' | ||
|
@@ -70,7 +70,8 @@ jobs: | |
coverage: | ||
uses: kornia/workflows/.github/workflows/coverage.yml@main | ||
needs: [pre-tests] | ||
uses: kornia/workflows/.github/workflows/[email protected] | ||
with: | ||
cache-path: weights/ | ||
cache-key: model-weights-${{ needs.pre-tests.outputs.hash }} | ||
|
@@ -79,13 +80,14 @@ jobs: | |
model-weights- | ||
typing: | ||
uses: kornia/workflows/.github/workflows/mypy.yml@v1.10.1 | ||
uses: kornia/workflows/.github/workflows/mypy.yml@v1.12.0 | ||
|
||
tutorials: | ||
uses: kornia/workflows/.github/workflows/tutorials.yml@v1.10.1 | ||
uses: kornia/workflows/.github/workflows/tutorials.yml@v1.12.0 | ||
|
||
docs: | ||
uses: kornia/workflows/.github/workflows/docs.yml@main | ||
needs: [pre-tests] | ||
uses: kornia/workflows/.github/workflows/[email protected] | ||
with: | ||
python-version: '["3.11"]' | ||
cache-path: weights/ | ||
|
@@ -94,7 +96,6 @@ jobs: | |
model-weights-${{ needs.pre-tests.outputs.hash }} | ||
model-weights- | ||
collector: | ||
needs: [coverage, tests-cpu, tutorials, typing, docs] | ||
if: always() | ||
|
@@ -106,6 +107,7 @@ jobs: | |
|
||
tests-nightly: | ||
if: contains(github.event.pull_request.labels.*.name, 'nightly') | ||
needs: [pre-tests] | ||
name: ${{ matrix.os }} - torch-nightly, ${{ matrix.pytorch-dtype }} | ||
|
||
strategy: | ||
|
@@ -114,7 +116,7 @@ jobs: | |
os: ['Ubuntu-latest', 'Windows-latest'] #, 'MacOS-latest'] add it when https://github.com/pytorch/pytorch/pull/89262 be merged | ||
pytorch-dtype: ['float32', 'float64'] | ||
|
||
uses: kornia/workflows/.github/workflows/tests.yml@main | ||
uses: kornia/workflows/.github/workflows/tests.yml@v1.12.0 | ||
with: | ||
os: ${{ matrix.os }} | ||
pytorch-version: '["nightly"]' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,57 +11,107 @@ concurrency: | |
cancel-in-progress: true | ||
|
||
jobs: | ||
pre-tests: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
hash: ${{ steps.hashid.outputs.weights-hash }} | ||
steps: | ||
- uses: kornia/workflows/.github/actions/[email protected] | ||
- uses: actions/cache@v4 | ||
id: cache-weights | ||
with: | ||
path: weights/ | ||
key: model-weights-${{ hashFiles('.github/download-models-weights.py') }} | ||
enableCrossOsArchive: true | ||
|
||
- name: Download models weights... | ||
if: steps.cache-weights.outputs.cache-hit != 'true' | ||
run: python .github/download-models-weights.py -t weights/ | ||
|
||
- name: write hashid | ||
id: hashid | ||
run: echo "weights-hash=${{ hashFiles('.github/download-models-weights.py') }}" >> "$GITHUB_OUTPUT" | ||
|
||
tests-cpu-ubuntu: | ||
needs: [pre-tests] | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
# os: ['Ubuntu-latest', 'Windows-latest', 'MacOS-latest'] | ||
pytorch-dtype: ['float32', 'float64'] | ||
|
||
uses: kornia/workflows/.github/workflows/tests.yml@v1.10.1 | ||
uses: kornia/workflows/.github/workflows/tests.yml@v1.12.0 | ||
with: | ||
os: 'Ubuntu-latest' | ||
python-version: '["3.8", "3.9", "3.10", "3.11", "3.12"]' | ||
pytorch-version: '["1.9.1", "1.10.2", "1.11.0", "1.12.1", "1.13.1", "2.0.1", "2.1.2", "2.2.2", "2.3.1"]' | ||
pytorch-dtype: ${{ matrix.pytorch-dtype }} | ||
pytest-extra: '--runslow' | ||
|
||
|
||
cache-path: weights/ | ||
cache-key: model-weights-${{ needs.pre-tests.outputs.hash }} | ||
cache-restore-keys: | | ||
model-weights-${{ needs.pre-tests.outputs.hash }} | ||
model-weights- | ||
tests-cpu-windows: | ||
needs: [pre-tests] | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
pytorch-dtype: ['float32', 'float64'] | ||
|
||
uses: kornia/workflows/.github/workflows/tests.yml@v1.10.1 | ||
uses: kornia/workflows/.github/workflows/tests.yml@v1.12.0 | ||
with: | ||
os: 'Windows-latest' | ||
python-version: '["3.12"]' | ||
pytorch-version: '["1.9.1", "2.3.1"]' | ||
pytorch-dtype: ${{ matrix.pytorch-dtype }} | ||
cache-path: weights/ | ||
cache-key: model-weights-${{ needs.pre-tests.outputs.hash }} | ||
cache-restore-keys: | | ||
model-weights-${{ needs.pre-tests.outputs.hash }} | ||
model-weights- | ||
tests-cpu-mac: | ||
needs: [pre-tests] | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
pytorch-dtype: ['float32', 'float64'] | ||
|
||
uses: kornia/workflows/.github/workflows/tests.yml@v1.10.1 | ||
uses: kornia/workflows/.github/workflows/tests.yml@v1.12.0 | ||
with: | ||
os: 'MacOS-latest' | ||
pytorch-dtype: ${{ matrix.pytorch-dtype }} | ||
cache-path: weights/ | ||
cache-key: model-weights-${{ needs.pre-tests.outputs.hash }} | ||
cache-restore-keys: | | ||
model-weights-${{ needs.pre-tests.outputs.hash }} | ||
model-weights- | ||
coverage: | ||
uses: kornia/workflows/.github/workflows/[email protected] | ||
needs: [pre-tests] | ||
uses: kornia/workflows/.github/workflows/[email protected] | ||
with: | ||
cache-path: weights/ | ||
cache-key: model-weights-${{ needs.pre-tests.outputs.hash }} | ||
cache-restore-keys: | | ||
model-weights-${{ needs.pre-tests.outputs.hash }} | ||
model-weights- | ||
typing: | ||
uses: kornia/workflows/.github/workflows/mypy.yml@v1.10.1 | ||
uses: kornia/workflows/.github/workflows/mypy.yml@v1.12.0 | ||
|
||
tutorials: | ||
uses: kornia/workflows/.github/workflows/tutorials.yml@v1.10.1 | ||
uses: kornia/workflows/.github/workflows/tutorials.yml@v1.12.0 | ||
|
||
docs: | ||
uses: kornia/workflows/.github/workflows/[email protected] | ||
needs: [pre-tests] | ||
uses: kornia/workflows/.github/workflows/[email protected] | ||
with: | ||
python-version: '["3.11"]' | ||
cache-path: weights/ | ||
cache-key: model-weights-${{ needs.pre-tests.outputs.hash }} | ||
cache-restore-keys: | | ||
model-weights-${{ needs.pre-tests.outputs.hash }} | ||
model-weights- |