Skip to content

Commit

Permalink
torch 2.5 and python 3.12 support (#1264)
Browse files Browse the repository at this point in the history
Add workflows to run tests with Pytorch 2.5 to officially support torch 2.5.
Extend current versions tests with missing Python 3.12.
Update actions dependencies version
unittest - update deprecated self.assertEquals to self.assertEqual
  • Loading branch information
Chizkiyahu authored Nov 13, 2024
1 parent 9ac9f54 commit 95fc532
Show file tree
Hide file tree
Showing 20 changed files with 166 additions and 30 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/link_checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
link-checker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install Python 3
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: 3.10.*
- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ jobs:
if: github.repository == 'sony/model_optimization' # Don't do this in forks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install Python 3
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: 3.8

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install Python 3
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/run_keras_sony_custom_layers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
run-tensorflow-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install Python 3
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/run_keras_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
run-tensorflow-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install Python 3
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/run_pytorch_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
run-pytorch-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install Python 3
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
- name: Install dependencies
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/run_tests_python310_pytorch25.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Python 3.10, Pytorch 2.5
on:
workflow_dispatch: # Allow manual triggers
schedule:
- cron: 0 0 * * *
pull_request:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
run-tests:
uses: ./.github/workflows/run_pytorch_tests.yml
with:
python-version: "3.10"
torch-version: "2.5.*"
19 changes: 19 additions & 0 deletions .github/workflows/run_tests_python311_pytorch25.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Python 3.11, Pytorch 2.5
on:
workflow_dispatch: # Allow manual triggers
schedule:
- cron: 0 0 * * *
pull_request:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
run-tests:
uses: ./.github/workflows/run_pytorch_tests.yml
with:
python-version: "3.11"
torch-version: "2.5.*"
19 changes: 19 additions & 0 deletions .github/workflows/run_tests_python312_pytorch22.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Python 3.12, Pytorch 2.2
on:
workflow_dispatch: # Allow manual triggers
schedule:
- cron: 0 0 * * *
pull_request:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
run-tests:
uses: ./.github/workflows/run_pytorch_tests.yml
with:
python-version: "3.12"
torch-version: "2.2.*"
19 changes: 19 additions & 0 deletions .github/workflows/run_tests_python312_pytorch23.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Python 3.12, Pytorch 2.3
on:
workflow_dispatch: # Allow manual triggers
schedule:
- cron: 0 0 * * *
pull_request:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
run-tests:
uses: ./.github/workflows/run_pytorch_tests.yml
with:
python-version: "3.12"
torch-version: "2.3.*"
19 changes: 19 additions & 0 deletions .github/workflows/run_tests_python312_pytorch24.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Python 3.12, Pytorch 2.4
on:
workflow_dispatch: # Allow manual triggers
schedule:
- cron: 0 0 * * *
pull_request:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
run-tests:
uses: ./.github/workflows/run_pytorch_tests.yml
with:
python-version: "3.12"
torch-version: "2.4.*"
19 changes: 19 additions & 0 deletions .github/workflows/run_tests_python312_pytorch25.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Python 3.2, Pytorch 2.5
on:
workflow_dispatch: # Allow manual triggers
schedule:
- cron: 0 0 * * *
pull_request:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
run-tests:
uses: ./.github/workflows/run_pytorch_tests.yml
with:
python-version: "3.12"
torch-version: "2.5.*"
19 changes: 19 additions & 0 deletions .github/workflows/run_tests_python39_pytorch25.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Python 3.9, Pytorch 2.5
on:
workflow_dispatch: # Allow manual triggers
schedule:
- cron: 0 0 * * *
pull_request:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
run-tests:
uses: ./.github/workflows/run_pytorch_tests.yml
with:
python-version: "3.9"
torch-version: "2.5.*"
4 changes: 2 additions & 2 deletions .github/workflows/run_tests_suite_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:
env:
COVERAGE_THRESHOLD: 98
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install Python 3
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: '3.10'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
pull-requests: write

steps:
- uses: actions/stale@v3
- uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'Stale issue message'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_whl_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Python 3
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python_version }}
- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests_common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install Python 3
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install dependencies
Expand Down
Loading

0 comments on commit 95fc532

Please sign in to comment.