Skip to content

Commit

Permalink
Add torch=2.4.0, 2.3.1, 2.2.2 to CI (espnet#5766)
Browse files Browse the repository at this point in the history
Add torch=2.4.0, 2.3.1, 2.2.2 to CI
  • Loading branch information
kamo-naoyuki authored Aug 22, 2024
1 parent 1c1a12d commit 5df1271
Show file tree
Hide file tree
Showing 8 changed files with 115 additions and 41 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci_on_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
matrix:
python-version: ["3.10"]
pytorch-version: [2.1.0]
pytorch-version: [2.1.2]
use-conda: [true, false]
steps:
- uses: actions/checkout@master
Expand Down
20 changes: 5 additions & 15 deletions .github/workflows/ci_on_ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
matrix:
os: [ubuntu-latest]
python-version: ["3.10"]
pytorch-version: [2.1.0]
pytorch-version: [2.4.0]
chainer-version: [6.0.0]
use-conda: [false]
include:
Expand Down Expand Up @@ -107,15 +107,10 @@ jobs:
matrix:
os: [ubuntu-latest]
python-version: [3.8, 3.9, "3.10"]
pytorch-version: [2.0.1, 2.1.0]
pytorch-version: [2.0.1, 2.1.2, 2.2.2, 2.3.1, 2.4.0]
chainer-version: [6.0.0]
use-conda: [false]
include:
- os: ubuntu-latest
python-version: "3.7"
pytorch-version: 1.12.1
chainer-verssion: 6.0.0
use-conda: false
- os: ubuntu-latest
python-version: "3.7"
pytorch-version: 1.13.1
Expand Down Expand Up @@ -202,7 +197,7 @@ jobs:
include:
- os: ubuntu-latest
python-version: "3.10"
pytorch-version: 2.1.0
pytorch-version: 2.4.0
chainer-verssion: 6.0.0
use-conda: false
steps:
Expand Down Expand Up @@ -246,15 +241,10 @@ jobs:
matrix:
os: [ubuntu-latest]
python-version: [3.8, 3.9, "3.10"]
pytorch-version: [2.0.1, 2.1.0]
pytorch-version: [2.0.1, 2.1.2, 2.2.2, 2.3.1, 2.4.0]
chainer-version: [6.0.0]
use-conda: [false]
include:
- os: ubuntu-latest
python-version: "3.7"
pytorch-version: 1.12.1
chainer-verssion: 6.0.0
use-conda: false
- os: ubuntu-latest
python-version: "3.7"
pytorch-version: 1.13.1
Expand Down Expand Up @@ -331,7 +321,7 @@ jobs:
matrix:
os: [ubuntu-latest]
python-version: ["3.10"]
pytorch-version: [2.1.0]
pytorch-version: [2.4.0]
steps:
- uses: actions/checkout@v2
- name: Set up Python
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_on_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
matrix:
python-version: ["3.10"]
pytorch-version: [2.1.0]
pytorch-version: [2.4.0]
defaults:
run:
shell: bash
Expand Down
28 changes: 18 additions & 10 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,30 @@ pull_request_rules:
- "label=auto-merge"
- "check-success=unit_test_espnet1_and_espnet2_on_centos7"
- "check-success=unit_test_espnet1_and_espnet2_on_debian11"
- "check-success=check_installable_on_windows (3.10, 2.1.0)"
- "check-success=check_installable_on_macos (3.10, 2.1.0, true)"
- "check-success=check_installable_on_macos (3.10, 2.1.0, false)"
- "check-success=check_installable_on_windows (3.10, 2.3.0)"
- "check-success=check_installable_on_macos (3.10, 2.1.2, true)"
- "check-success=check_installable_on_macos (3.10, 2.1.2, false)"
- "check-success=unit_test_espnet1_and_integration_test_espnet1 (ubuntu-latest, 3.7, 1.13.1, false, 6.0.0)"
- "check-success=unit_test_espnet1_and_integration_test_espnet1 (ubuntu-latest, 3.10, 2.1.0, 6.0.0, false)"
- "check-success=unit_test_espnet2_and_integration_test_espnet2 (ubuntu-latest, 3.7, 1.12.1, false, 6.0.0)"
- "check-success=unit_test_espnet1_and_integration_test_espnet1 (ubuntu-latest, 3.10, 2.4.0, 6.0.0, false)"
- "check-success=unit_test_espnet2_and_integration_test_espnet2 (ubuntu-latest, 3.7, 1.13.1, false, 6.0.0)"
- "check-success=unit_test_espnet2_and_integration_test_espnet2 (ubuntu-latest, 3.8, 2.0.1, 6.0.0, false)"
- "check-success=unit_test_espnet2_and_integration_test_espnet2 (ubuntu-latest, 3.9, 2.0.1, 6.0.0, false)"
- "check-success=unit_test_espnet2_and_integration_test_espnet2 (ubuntu-latest, 3.10, 2.0.1, 6.0.0, false)"
- "check-success=unit_test_espnet2_and_integration_test_espnet2 (ubuntu-latest, 3.8, 2.1.0, 6.0.0, false)"
- "check-success=unit_test_espnet2_and_integration_test_espnet2 (ubuntu-latest, 3.9, 2.1.0, 6.0.0, false)"
- "check-success=unit_test_espnet2_and_integration_test_espnet2 (ubuntu-latest, 3.10, 2.1.0, 6.0.0, false)"
- "check-success=unit_test_espnet2_and_integration_test_espnet2 (ubuntu-latest, 3.8, 2.1.2, 6.0.0, false)"
- "check-success=unit_test_espnet2_and_integration_test_espnet2 (ubuntu-latest, 3.9, 2.1.2, 6.0.0, false)"
- "check-success=unit_test_espnet2_and_integration_test_espnet2 (ubuntu-latest, 3.10, 2.1.2, 6.0.0, false)"
- "check-success=unit_test_espnet2_and_integration_test_espnet2 (ubuntu-latest, 3.8, 2.2.2, 6.0.0, false)"
- "check-success=unit_test_espnet2_and_integration_test_espnet2 (ubuntu-latest, 3.9, 2.2.2, 6.0.0, false)"
- "check-success=unit_test_espnet2_and_integration_test_espnet2 (ubuntu-latest, 3.10, 2.2.2, 6.0.0, false)"
- "check-success=unit_test_espnet2_and_integration_test_espnet2 (ubuntu-latest, 3.8, 2.3.1, 6.0.0, false)"
- "check-success=unit_test_espnet2_and_integration_test_espnet2 (ubuntu-latest, 3.9, 2.3.1, 6.0.0, false)"
- "check-success=unit_test_espnet2_and_integration_test_espnet2 (ubuntu-latest, 3.10, 2.3.1, 6.0.0, false)"
- "check-success=unit_test_espnet2_and_integration_test_espnet2 (ubuntu-latest, 3.8, 2.4.0, 6.0.0, false)"
- "check-success=unit_test_espnet2_and_integration_test_espnet2 (ubuntu-latest, 3.9, 2.4.0, 6.0.0, false)"
- "check-success=unit_test_espnet2_and_integration_test_espnet2 (ubuntu-latest, 3.10, 2.4.0, 6.0.0, false)"
- "check-success=test_configuration_espnet2 (ubuntu-latest, 3.7, 1.13.1, 6.0.0, false)"
- "check-success=test_configuration_espnet2 (ubuntu-latest, 3.10, 2.1.0, false, 6.0.0)"
- "check-success=test_import (ubuntu-latest, 3.10, 2.1.0)"
- "check-success=test_configuration_espnet2 (ubuntu-latest, 3.10, 2.4.0, false, 6.0.0)"
- "check-success=test_import (ubuntu-latest, 3.10, 2.4.0)"
- "check-success=check_kaldi_symlinks"
actions:
merge:
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

# ESPnet: end-to-end speech processing toolkit

|system/pytorch ver.|1.12.1|1.13.1|2.0.1|2.1.0|
| :---- | :---: | :---: | :---: | :---: |
|ubuntu/python3.10/pip|||[![ci on ubuntu](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml/badge.svg)](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml?query=branch%3Amaster)|[![ci on ubuntu](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml/badge.svg)](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml?query=branch%3Amaster)|
|ubuntu/python3.9/pip|||[![ci on ubuntu](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml/badge.svg)](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml?query=branch%3Amaster)|[![ci on ubuntu](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml/badge.svg)](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml?query=branch%3Amaster)|
|ubuntu/python3.8/pip|||[![ci on ubuntu](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml/badge.svg)](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml?query=branch%3Amaster)|[![ci on ubuntu](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml/badge.svg)](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml?query=branch%3Amaster)|
|ubuntu/python3.7/pip|[![ci on ubuntu](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml/badge.svg)](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml?query=branch%3Amaster)|[![ci on ubuntu](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml/badge.svg)](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml?query=branch%3Amaster)|||
|debian11/python3.10/conda||[![ci on debian11](https://github.com/espnet/espnet/actions/workflows/ci_on_debian11.yml/badge.svg)](https://github.com/espnet/espnet/actions/workflows/ci_on_debian11.yml?query=branch%3Amaster)|||
|windows/python3.10/pip||||[![ci on windows](https://github.com/espnet/espnet/actions/workflows/ci_on_windows.yml/badge.svg)](https://github.com/espnet/espnet/actions/workflows/ci_on_windows.yml?query=branch%3Amaster)|
|macos/python3.10/pip||||[![ci on macos](https://github.com/espnet/espnet/actions/workflows/ci_on_macos.yml/badge.svg)](https://github.com/espnet/espnet/actions/workflows/ci_on_macos.yml?query=branch%3Amaster)|
|macos/python3.10/conda||||[![ci on macos](https://github.com/espnet/espnet/actions/workflows/ci_on_macos.yml/badge.svg)](https://github.com/espnet/espnet/actions/workflows/ci_on_macos.yml?query=branch%3Amaster)|
|system/pytorch ver.|1.13.1|2.0.1|2.1.2|2.2.2|2.3.1|2.4.0|
| :---- | :---: | :---: | :---: | :---: | :---: | :---: |
|ubuntu/python3.10/pip||[![ci on ubuntu](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml/badge.svg)](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml?query=branch%3Amaster)|[![ci on ubuntu](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml/badge.svg)](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml?query=branch%3Amaster)|[![ci on ubuntu](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml/badge.svg)](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml?query=branch%3Amaster)|[![ci on ubuntu](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml/badge.svg)](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml?query=branch%3Amaster)|[![ci on ubuntu](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml/badge.svg)](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml?query=branch%3Amaster)|
|ubuntu/python3.9/pip||[![ci on ubuntu](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml/badge.svg)](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml?query=branch%3Amaster)|[![ci on ubuntu](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml/badge.svg)](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml?query=branch%3Amaster)|[![ci on ubuntu](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml/badge.svg)](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml?query=branch%3Amaster)|[![ci on ubuntu](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml/badge.svg)](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml?query=branch%3Amaster)|[![ci on ubuntu](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml/badge.svg)](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml?query=branch%3Amaster)|
|ubuntu/python3.8/pip||[![ci on ubuntu](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml/badge.svg)](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml?query=branch%3Amaster)|[![ci on ubuntu](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml/badge.svg)](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml?query=branch%3Amaster)|[![ci on ubuntu](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml/badge.svg)](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml?query=branch%3Amaster)|[![ci on ubuntu](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml/badge.svg)](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml?query=branch%3Amaster)|[![ci on ubuntu](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml/badge.svg)](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml?query=branch%3Amaster)|
|ubuntu/python3.7/pip|[![ci on ubuntu](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml/badge.svg)](https://github.com/espnet/espnet/actions/workflows/ci_on_ubuntu.yml?query=branch%3Amaster)|||||
|debian11/python3.10/conda|[![ci on debian11](https://github.com/espnet/espnet/actions/workflows/ci_on_debian11.yml/badge.svg)](https://github.com/espnet/espnet/actions/workflows/ci_on_debian11.yml?query=branch%3Amaster)|||||
|windows/python3.10/pip||||||[![ci on windows](https://github.com/espnet/espnet/actions/workflows/ci_on_windows.yml/badge.svg)](https://github.com/espnet/espnet/actions/workflows/ci_on_windows.yml?query=branch%3Amaster)|
|macos/python3.10/pip|||[![ci on macos](https://github.com/espnet/espnet/actions/workflows/ci_on_macos.yml/badge.svg)](https://github.com/espnet/espnet/actions/workflows/ci_on_macos.yml?query=branch%3Amaster)||||
|macos/python3.10/conda|||[![ci on macos](https://github.com/espnet/espnet/actions/workflows/ci_on_macos.yml/badge.svg)](https://github.com/espnet/espnet/actions/workflows/ci_on_macos.yml?query=branch%3Amaster)||||

<div align="center">

Expand Down
2 changes: 1 addition & 1 deletion ci/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ python3 -c "import matplotlib.pyplot"
cat >> constraints.txt << EOF
torch==${TH_VERSION}
EOF
python3 -m pip install -c constraints.txt onnxruntime onnx2torch
python3 -m pip install -c constraints.txt onnxruntime onnx2torch --extra-index-url https://download.pytorch.org/whl/cpu

# NOTE(kan-bayashi): Fix the error in black installation.
# See: https://github.com/psf/black/issues/1707
Expand Down
4 changes: 2 additions & 2 deletions tools/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# PyTorch version: 1.12.1, 1.13.1, 2.0.1, 2.1.0 are tested.
TH_VERSION := 2.1.0
# PyTorch version: 1.13.1, 2.0.1, 2.1.2, 2.2.2, 2.3.1, 2.4.0 are tested.
TH_VERSION := 2.3.0

# Use pip for pytorch installation even if you have anaconda
ifneq ($(shell test -f ./activate_python.sh && grep 'conda activate' ./activate_python.sh),)
Expand Down
78 changes: 77 additions & 1 deletion tools/installers/install_torch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,86 @@ if ! python -c "import packaging.version" &> /dev/null; then
python3 -m pip install packaging
fi

if $(pytorch_plus 2.1.1); then
if $(pytorch_plus 2.4.1); then
log "[ERROR] This script doesn't support pytorch=${torch_version}"
exit 1

elif $(pytorch_plus 2.4.0); then
check_python_version 3.13 # Error if python>=<number>
if ! check_cuda_version 12.4 12.1 11.8; then
log "[INFO] Fallback: cuda_version=${cuda_version} -> cuda_version=12.4"
cuda_version=12.4
cuda_version_without_dot="${cuda_version/\./}"
fi
install_torch 2.4.0 # install_torch <torch-audio-ver>

elif $(pytorch_plus 2.3.2); then
log "[ERROR] pytorch=${torch_version} doesn't exist"
exit 1

elif $(pytorch_plus 2.3.1); then
check_python_version 3.13 # Error if python>=<number>
if ! check_cuda_version 12.1 11.8; then
log "[INFO] Fallback: cuda_version=${cuda_version} -> cuda_version=12.1"
cuda_version=12.1
cuda_version_without_dot="${cuda_version/\./}"
fi
install_torch 2.3.1 # install_torch <torch-audio-ver>

elif $(pytorch_plus 2.3.0); then
check_python_version 3.13 # Error if python>=<number>
if ! check_cuda_version 12.1 11.8; then
log "[INFO] Fallback: cuda_version=${cuda_version} -> cuda_version=12.1"
cuda_version=12.1
cuda_version_without_dot="${cuda_version/\./}"
fi
install_torch 2.3.0 # install_torch <torch-audio-ver>

elif $(pytorch_plus 2.2.2); then
check_python_version 3.13 # Error if python>=<number>
if ! check_cuda_version 12.1 11.8; then
log "[INFO] Fallback: cuda_version=${cuda_version} -> cuda_version=12.1"
cuda_version=12.1
cuda_version_without_dot="${cuda_version/\./}"
fi
install_torch 2.2.2 # install_torch <torch-audio-ver>

elif $(pytorch_plus 2.2.1); then
check_python_version 3.13 # Error if python>=<number>
if ! check_cuda_version 12.1 11.8; then
log "[INFO] Fallback: cuda_version=${cuda_version} -> cuda_version=12.1"
cuda_version=12.1
cuda_version_without_dot="${cuda_version/\./}"
fi
install_torch 2.2.1 # install_torch <torch-audio-ver>

elif $(pytorch_plus 2.2.0); then
check_python_version 3.13 # Error if python>=<number>
if ! check_cuda_version 12.1 11.8; then
log "[INFO] Fallback: cuda_version=${cuda_version} -> cuda_version=12.1"
cuda_version=12.1
cuda_version_without_dot="${cuda_version/\./}"
fi
install_torch 2.2.0 # install_torch <torch-audio-ver>

elif $(pytorch_plus 2.1.2); then
check_python_version 3.12 # Error if python>=<number>
if ! check_cuda_version 12.1 11.8; then
log "[INFO] Fallback: cuda_version=${cuda_version} -> cuda_version=12.1"
cuda_version=12.1
cuda_version_without_dot="${cuda_version/\./}"
fi
install_torch 2.1.2 # install_torch <torch-audio-ver>

elif $(pytorch_plus 2.1.1); then
check_python_version 3.12 # Error if python>=<number>
if ! check_cuda_version 12.1 11.8; then
log "[INFO] Fallback: cuda_version=${cuda_version} -> cuda_version=12.1"
cuda_version=12.1
cuda_version_without_dot="${cuda_version/\./}"
fi
install_torch 2.1.1 # install_torch <torch-audio-ver>

elif $(pytorch_plus 2.1.0); then
check_python_version 3.12 # Error if python>=<number>
if ! check_cuda_version 12.1 11.8; then
Expand Down

0 comments on commit 5df1271

Please sign in to comment.