Skip to content

Commit

Permalink
feat: cache models weight for coverage and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnv1 committed Aug 18, 2024
1 parent ad135d8 commit dfd07e8
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ on:
required: false
type: string
default: ${{ github.sha }}
cache-path:
required: false
type: string
cache-key:
required: false
type: string
cache-restore-keys:
required: false
type: string

jobs:
slow:
Expand All @@ -32,6 +41,14 @@ jobs:
pytorch-dtype: ['float32', 'float64']

steps:
- name: Restore cache
if: "${{ inputs.cache-path != '' }}"
uses: actions/cache/restore@v4
with:
path: ${{ inputs.cache-path }}
key: ${{ inputs.cache-key }}
restore-keys: ${{ inputs.cache-restore-keys }}

- uses: kornia/workflows/.github/actions/[email protected]
with:
os: ${{ inputs.os }}
Expand All @@ -52,6 +69,14 @@ jobs:
pytorch-dtype: ['float32']

steps:
- name: Restore cache
if: "${{ inputs.cache-path != '' }}"
uses: actions/cache/restore@v4
with:
path: ${{ inputs.cache-path }}
key: ${{ inputs.cache-key }}
restore-keys: ${{ inputs.cache-restore-keys }}

- uses: kornia/workflows/.github/actions/[email protected]
with:
os: ${{ inputs.os }}
Expand All @@ -72,6 +97,14 @@ jobs:
pytorch-dtype: ['float32', 'float64']

steps:
- name: Restore cache
if: "${{ inputs.cache-path != '' }}"
uses: actions/cache/restore@v4
with:
path: ${{ inputs.cache-path }}
key: ${{ inputs.cache-key }}
restore-keys: ${{ inputs.cache-restore-keys }}

- uses: kornia/workflows/.github/actions/[email protected]
with:
os: ${{ inputs.os }}
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ on:
required: false
type: string
default: ${{ github.sha }}
cache-path:
required: false
type: string
cache-key:
required: false
type: string
cache-restore-keys:
required: false
type: string

jobs:
test-and-build:
Expand Down Expand Up @@ -72,6 +81,14 @@ jobs:
pytorch-version: ${{ matrix.pytorch-version }}
ref: ${{ inputs.ref }}

- name: Restore cache
if: "${{ inputs.cache-path != '' }}"
uses: actions/cache/restore@v4
with:
path: ${{ inputs.cache-path }}
key: ${{ inputs.cache-key }}
restore-keys: ${{ inputs.cache-restore-keys }}

- name: Run doctest
shell: bash -l {0}
run: make doctest
Expand Down

0 comments on commit dfd07e8

Please sign in to comment.