Skip to content

Commit

Permalink
Merge pull request #21 from kornia/chore/support312
Browse files Browse the repository at this point in the history
chore: add support to py312
  • Loading branch information
johnnv1 authored Jun 15, 2024
2 parents 5409702 + 02071ad commit c9861cc
Show file tree
Hide file tree
Showing 9 changed files with 87 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .github/actions/coverage/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ inputs:
python-version:
required: false
type: string
default: "3.11"
default: "3.12"
pytorch-version:
required: false
type: string
Expand Down Expand Up @@ -36,7 +36,7 @@ runs:
using: "composite"
steps:
- name: Setting environment on ${{ inputs.os }} with python ${{ inputs.python-version }} and pytorch ${{ inputs.pytorch-version }}
uses: kornia/workflows/.github/actions/env@v1.8.1
uses: kornia/workflows/.github/actions/env@v1.9.1
with:
python-version: ${{ inputs.python-version }}
pytorch-version: ${{ inputs.pytorch-version }}
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ inputs:
python-version:
description: "The python version desired."
required: true
default: "3.11"
default: "3.12"
type: string

pytorch-version:
Expand Down Expand Up @@ -35,7 +35,7 @@ runs:
fetch-depth: ${{ inputs.fetch-depth }}

- name: Setup environment
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}

Expand Down
2 changes: 1 addition & 1 deletion .github/actions/tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ inputs:
python-version:
required: false
type: string
default: "3.11"
default: "3.12"
pytorch-version:
required: false
type: string
Expand Down
19 changes: 18 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
python-version:
required: false
type: string
default: '["3.11"]'
default: '["3.12"]'
pytorch-version:
required: false
type: string
Expand Down Expand Up @@ -32,10 +32,12 @@ jobs:
python-version: ${{ fromJSON(inputs.python-version) }}
pytorch-version: ${{ fromJSON(inputs.pytorch-version) }}
exclude:
# support to python3.10 only on torch 1.11 or greater
- pytorch-version: '1.9.1'
python-version: '3.10'
- pytorch-version: '1.10.2'
python-version: '3.10'
# support to python3.11 only on torch 2.0 or greater
- pytorch-version: '1.9.1'
python-version: '3.11'
- pytorch-version: '1.10.2'
Expand All @@ -46,6 +48,21 @@ jobs:
python-version: '3.11'
- pytorch-version: '1.13.1'
python-version: '3.11'
# support to python3.12 only on torch 2.2 or greater
- pytorch-version: '1.9.1'
python-version: '3.12'
- pytorch-version: '1.10.2'
python-version: '3.12'
- pytorch-version: '1.11.0'
python-version: '3.12'
- pytorch-version: '1.12.1'
python-version: '3.12'
- pytorch-version: '1.13.1'
python-version: '3.12'
- pytorch-version: '2.0.1'
python-version: '3.12'
- pytorch-version: '2.1.2'
python-version: '3.12'

steps:
- name: Setting environment on ${{ inputs.os }} with python ${{ matrix.python-version }} and pytorch ${{ matrix.pytorch-version }}
Expand Down
19 changes: 18 additions & 1 deletion .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
python-version:
required: false
type: string
default: '["3.11"]'
default: '["3.12"]'
pytorch-version:
required: false
type: string
Expand Down Expand Up @@ -32,10 +32,12 @@ jobs:
python-version: ${{ fromJSON(inputs.python-version) }}
pytorch-version: ${{ fromJSON(inputs.pytorch-version) }}
exclude:
# support to python3.10 only on torch 1.11 or greater
- pytorch-version: '1.9.1'
python-version: '3.10'
- pytorch-version: '1.10.2'
python-version: '3.10'
# support to python3.11 only on torch 2.0 or greater
- pytorch-version: '1.9.1'
python-version: '3.11'
- pytorch-version: '1.10.2'
Expand All @@ -46,6 +48,21 @@ jobs:
python-version: '3.11'
- pytorch-version: '1.13.1'
python-version: '3.11'
# support to python3.12 only on torch 2.2 or greater
- pytorch-version: '1.9.1'
python-version: '3.12'
- pytorch-version: '1.10.2'
python-version: '3.12'
- pytorch-version: '1.11.0'
python-version: '3.12'
- pytorch-version: '1.12.1'
python-version: '3.12'
- pytorch-version: '1.13.1'
python-version: '3.12'
- pytorch-version: '2.0.1'
python-version: '3.12'
- pytorch-version: '2.1.2'
python-version: '3.12'

steps:
- name: Setting environment on ${{ inputs.os }} with python ${{ matrix.python-version }} and pytorch ${{ matrix.pytorch-version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/self-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
uses: ./.github/workflows/tests.yml
with:
os: ubuntu-latest
python-version: '["3.10", "3.11"]'
python-version: '["3.10", "3.12"]'
pytorch-version: '["2.1.2", "2.3.1"]'
pytorch-dtype: 'float32'
ref: main
Expand Down
19 changes: 18 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
python-version:
required: false
type: string
default: '["3.11"]'
default: '["3.12"]'
pytorch-version:
required: false
type: string
Expand Down Expand Up @@ -44,10 +44,12 @@ jobs:
python-version: ${{ fromJSON(inputs.python-version) }}
pytorch-version: ${{ fromJSON(inputs.pytorch-version) }}
exclude:
# support to python3.10 only on torch 1.11 or greater
- pytorch-version: '1.9.1'
python-version: '3.10'
- pytorch-version: '1.10.2'
python-version: '3.10'
# support to python3.11 only on torch 2.0 or greater
- pytorch-version: '1.9.1'
python-version: '3.11'
- pytorch-version: '1.10.2'
Expand All @@ -58,6 +60,21 @@ jobs:
python-version: '3.11'
- pytorch-version: '1.13.1'
python-version: '3.11'
# support to python3.12 only on torch 2.2 or greater
- pytorch-version: '1.9.1'
python-version: '3.12'
- pytorch-version: '1.10.2'
python-version: '3.12'
- pytorch-version: '1.11.0'
python-version: '3.12'
- pytorch-version: '1.12.1'
python-version: '3.12'
- pytorch-version: '1.13.1'
python-version: '3.12'
- pytorch-version: '2.0.1'
python-version: '3.12'
- pytorch-version: '2.1.2'
python-version: '3.12'

steps:
- uses: kornia/workflows/.github/actions/[email protected]
Expand Down
19 changes: 18 additions & 1 deletion .github/workflows/tutorials.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
python-version:
required: false
type: string
default: '["3.11"]'
default: '["3.12"]'
pytorch-version:
required: false
type: string
Expand Down Expand Up @@ -32,10 +32,12 @@ jobs:
python-version: ${{ fromJSON(inputs.python-version) }}
pytorch-version: ${{ fromJSON(inputs.pytorch-version) }}
exclude:
# support to python3.10 only on torch 1.11 or greater
- pytorch-version: '1.9.1'
python-version: '3.10'
- pytorch-version: '1.10.2'
python-version: '3.10'
# support to python3.11 only on torch 2.0 or greater
- pytorch-version: '1.9.1'
python-version: '3.11'
- pytorch-version: '1.10.2'
Expand All @@ -46,6 +48,21 @@ jobs:
python-version: '3.11'
- pytorch-version: '1.13.1'
python-version: '3.11'
# support to python3.12 only on torch 2.2 or greater
- pytorch-version: '1.9.1'
python-version: '3.12'
- pytorch-version: '1.10.2'
python-version: '3.12'
- pytorch-version: '1.11.0'
python-version: '3.12'
- pytorch-version: '1.12.1'
python-version: '3.12'
- pytorch-version: '1.13.1'
python-version: '3.12'
- pytorch-version: '2.0.1'
python-version: '3.12'
- pytorch-version: '2.1.2'
python-version: '3.12'

steps:
- name: Setting environment on ${{ inputs.os }} with python ${{ matrix.python-version }} and pytorch ${{ matrix.pytorch-version }}
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Use the actions:
- `asottile/workflows/.github/actions/fast-checkout`

Has the inputs:
- `python-version`: (string, default: `'3.11'`) the python version desired.
- `python-version`: (string, default: `'3.12'`) the python version desired.
- The version should be supported by `setup-python@v4` action.
- `pytorch-version`: (string, default: `'2.3.1`') the pytorch version desired.
- This value will be used to install pytorch using conda from pytorch
Expand All @@ -38,7 +38,7 @@ responsible for running kornia tests.
Use the actions:
- `kornia/workflows/.github/actions/env`
Has the inputs:
- `python-version`: (string, default: `'3.11'`) the python version desired.
- `python-version`: (string, default: `'3.12'`) the python version desired.
- The version should be supported by `setup-python@v4` action.
- `pytorch-version`: (string, default: `'2.3.1`') the pytorch version desired.
- This value will be used to install pytorch using conda from pytorch
Expand Down Expand Up @@ -99,7 +99,7 @@ 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.11"]'`) a string with
- `python-version`: (json list of strings, default: `'["3.12"]'`) a string with
format of a json list within strings for each python version desired.
- `pytorch-version`: (json list of strings, default: `'["2.3.1"]'`) a string
with format of a json list within strings for each pytorch version desired.
Expand All @@ -120,7 +120,7 @@ jobs:
tests:
uses: kornia/workflows/.github/workflows/[email protected]
with:
python-version: '["3.8", "3.11"]'
python-version: '["3.8", "3.12"]'
pytorch-version: '["1.13.1", "2.0.0"]'
```

Expand Down Expand Up @@ -158,7 +158,7 @@ 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`: (string, default: `'3.11'`) the python version desired.
- `python-version`: (string, default: `'3.12'`) the python version desired.
- The version should be supported by `setup-python@v4` action.
- `pytorch-version`: (string, default: `'2.3.1`') the pytorch version desired.
- This value will be used to install pytorch using conda from pytorch
Expand All @@ -176,7 +176,7 @@ jobs:
coverage:
uses: kornia/workflows/.github/workflows/[email protected]
with:
python-version: "3.11"
python-version: "3.12"
pytorch-version: "2.0.0"
```
Expand All @@ -190,7 +190,7 @@ 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.11"]'`) a string with
- `python-version`: (json list of strings, default: `'["3.12"]'`) a string with
format of a json list within strings for each python version desired.
- `pytorch-version`: (json list of strings, default: `'["2.3.1"]'`) a string
with format of a json list within strings for each pytorch version desired.
Expand All @@ -216,7 +216,7 @@ 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.11"]'`) a string with
- `python-version`: (json list of strings, default: `'["3.12"]'`) a string with
format of a json list within strings for each python version desired.
- `pytorch-version`: (json list of strings, default: `'["2.3.1"]'`) a string
with format of a json list within strings for each pytorch version desired.
Expand All @@ -242,7 +242,7 @@ 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.11"]'`) a string with
- `python-version`: (json list of strings, default: `'["3.12"]'`) a string with
format of a json list within strings for each python version desired.
- `pytorch-version`: (json list of strings, default: `'["2.3.1"]'`) a string
with format of a json list within strings for each pytorch version desired.
Expand Down

0 comments on commit c9861cc

Please sign in to comment.