diff --git a/.github/workflows/ci_on_macos.yml b/.github/workflows/ci_on_macos.yml index db2cde85c84..b8a4a3fd409 100644 --- a/.github/workflows/ci_on_macos.yml +++ b/.github/workflows/ci_on_macos.yml @@ -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 diff --git a/.github/workflows/ci_on_ubuntu.yml b/.github/workflows/ci_on_ubuntu.yml index de2a05796b9..8eed674e87b 100644 --- a/.github/workflows/ci_on_ubuntu.yml +++ b/.github/workflows/ci_on_ubuntu.yml @@ -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: @@ -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 @@ -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: @@ -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 @@ -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 diff --git a/.github/workflows/ci_on_windows.yml b/.github/workflows/ci_on_windows.yml index 7009caa9ac7..d7a39aa8413 100644 --- a/.github/workflows/ci_on_windows.yml +++ b/.github/workflows/ci_on_windows.yml @@ -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 diff --git a/.mergify.yml b/.mergify.yml index 517f69b2969..72da1c5394f 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -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: diff --git a/README.md b/README.md index 97e6fe3ba76..694ff48d361 100644 --- a/README.md +++ b/README.md @@ -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)||||
diff --git a/ci/install.sh b/ci/install.sh index 711ca6686ee..0485dc8b29d 100755 --- a/ci/install.sh +++ b/ci/install.sh @@ -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 diff --git a/tools/Makefile b/tools/Makefile index cbd64153a44..342575252de 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -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),) diff --git a/tools/installers/install_torch.sh b/tools/installers/install_torch.sh index b8e74687a8d..b956be813a0 100755 --- a/tools/installers/install_torch.sh +++ b/tools/installers/install_torch.sh @@ -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>= + 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 + +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>= + 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 + +elif $(pytorch_plus 2.3.0); then + check_python_version 3.13 # Error if python>= + 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 + +elif $(pytorch_plus 2.2.2); then + check_python_version 3.13 # Error if python>= + 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 + +elif $(pytorch_plus 2.2.1); then + check_python_version 3.13 # Error if python>= + 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 + +elif $(pytorch_plus 2.2.0); then + check_python_version 3.13 # Error if python>= + 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 + +elif $(pytorch_plus 2.1.2); then + check_python_version 3.12 # Error if python>= + 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 + +elif $(pytorch_plus 2.1.1); then + check_python_version 3.12 # Error if python>= + 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 + elif $(pytorch_plus 2.1.0); then check_python_version 3.12 # Error if python>= if ! check_cuda_version 12.1 11.8; then