Skip to content

Commit

Permalink
Merge pull request #4627 from espnet/py310
Browse files Browse the repository at this point in the history
Add python=3.10 to CI
  • Loading branch information
kamo-naoyuki committed Mar 5, 2023
2 parents 7ec86b6 + a6b9e88 commit b5b2b11
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ jobs:
pytorch-version: 1.13.1
chainer-verssion: 6.0.0
use-conda: false
- os: ubuntu-20.04
python-version: "3.10"
pytorch-version: 1.12.1
chainer-verssion: 6.0.0
use-conda: false
steps:
- uses: actions/checkout@master
- uses: actions/cache@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: macOS-latest
strategy:
matrix:
python-version: [3.9]
python-version: ["3.10"]
pytorch-version: [1.13.1]
use-conda: [true, false]
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_import.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
max-parallel: 20
matrix:
os: [ubuntu-latest]
python-version: [3.9]
python-version: ["3.10"]
pytorch-version: [1.13.1]
steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: Windows-latest
strategy:
matrix:
python-version: [3.9]
python-version: ["3.10"]
pytorch-version: [1.13.1]
defaults:
run:
Expand Down
3 changes: 2 additions & 1 deletion .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ pull_request_rules:
- "check-success=linter_and_test (ubuntu-18.04, 3.7, 1.13.1, 6.0.0, false)"
- "check-success=linter_and_test (ubuntu-20.04, 3.8, 1.13.1, false, 6.0.0)"
- "check-success=linter_and_test (ubuntu-20.04, 3.9, 1.13.1, false, 6.0.0)"
- "check-success=test_import (ubuntu-latest, 3.9, 1.13.1)"
- "check-success=linter_and_test (ubuntu-20.04, 3.10, 1.13.1, false, 6.0.0)"
- "check-success=test_import (ubuntu-latest, 3.10, 1.13.1)"
actions:
merge:
method: merge
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

|system/pytorch ver.|1.4.0|1.5.1|1.6.0|1.7.1|1.8.1|1.9.1|1.10.2|1.11.0|1.12.1|1.13.1|
| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
|ubuntu20/python3.10/pip||||||||||[![Github Actions](https://github.com/espnet/espnet/workflows/CI/badge.svg)](https://github.com/espnet/espnet/actions)|
|ubuntu20/python3.9/pip||||||||||[![Github Actions](https://github.com/espnet/espnet/workflows/CI/badge.svg)](https://github.com/espnet/espnet/actions)|
|ubuntu20/python3.8/pip||||||||||[![Github Actions](https://github.com/espnet/espnet/workflows/CI/badge.svg)](https://github.com/espnet/espnet/actions)|
|ubuntu18/python3.7/pip|[![Github Actions](https://github.com/espnet/espnet/workflows/CI/badge.svg)](https://github.com/espnet/espnet/actions)|[![Github Actions](https://github.com/espnet/espnet/workflows/CI/badge.svg)](https://github.com/espnet/espnet/actions)|[![Github Actions](https://github.com/espnet/espnet/workflows/CI/badge.svg)](https://github.com/espnet/espnet/actions)|[![Github Actions](https://github.com/espnet/espnet/workflows/CI/badge.svg)](https://github.com/espnet/espnet/actions)|[![Github Actions](https://github.com/espnet/espnet/workflows/CI/badge.svg)](https://github.com/espnet/espnet/actions)|[![Github Actions](https://github.com/espnet/espnet/workflows/CI/badge.svg)](https://github.com/espnet/espnet/actions)|[![Github Actions](https://github.com/espnet/espnet/workflows/CI/badge.svg)](https://github.com/espnet/espnet/actions)|[![Github Actions](https://github.com/espnet/espnet/workflows/CI/badge.svg)](https://github.com/espnet/espnet/actions)|[![Github Actions](https://github.com/espnet/espnet/workflows/CI/badge.svg)](https://github.com/espnet/espnet/actions)|[![Github Actions](https://github.com/espnet/espnet/workflows/CI/badge.svg)](https://github.com/espnet/espnet/actions)|
Expand All @@ -12,6 +13,7 @@
|doc/python3.8||||||||||[![doc](https://github.com/espnet/espnet/workflows/doc/badge.svg)](https://github.com/espnet/espnet/actions?query=workflow%3Adoc)|



[![PyPI version](https://badge.fury.io/py/espnet.svg)](https://badge.fury.io/py/espnet)
[![Python Versions](https://img.shields.io/pypi/pyversions/espnet.svg)](https://pypi.org/project/espnet/)
[![Downloads](https://pepy.tech/badge/espnet)](https://pepy.tech/project/espnet)
Expand Down
3 changes: 3 additions & 0 deletions ci/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ python3 -c "import matplotlib.pyplot"
# See: https://github.com/psf/black/issues/1707
python3 -m pip uninstall -y typing

# NOTE(kamo): Workaround for pip resolve issue (I think this is a bug of pip)
python3 -m pip install "hacking>=2.0.0" "flake8>=3.7.8"

# install espnet
python3 -m pip install -e ".[test]"
python3 -m pip install -e ".[doc]"
Expand Down
10 changes: 10 additions & 0 deletions ci/test_integration_espnet2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -214,22 +214,32 @@ if python3 -c 'import torch as t; from packaging.version import parse as L; asse
continue
fi
fi
if [ "$f" == "egs2/how2_2000h/asr1/conf/train_asr_conformer_lf.yaml" ]; then
if ! python3 -c "import longformer" > /dev/null; then
continue
fi
fi
${python} -m espnet2.bin.asr_train --config "${f}" --iterator_type none --dry_run true --output_dir out --token_list dummy_token_list
done

for f in egs2/*/asr1/conf/train_lm*.yaml; do
${python} -m espnet2.bin.lm_train --config "${f}" --iterator_type none --dry_run true --output_dir out --token_list dummy_token_list
done

for f in egs2/*/tts1/conf/train*.yaml; do
${python} -m espnet2.bin.tts_train --config "${f}" --iterator_type none --normalize none --dry_run true --output_dir out --token_list dummy_token_list
done

for f in egs2/*/enh1/conf/train*.yaml; do
${python} -m espnet2.bin.enh_train --config "${f}" --iterator_type none --dry_run true --output_dir out
done

if python3 -c 'import torch as t; from packaging.version import parse as L; assert L(t.__version__) >= L("1.12.0")' &> /dev/null; then
for f in egs2/*/ssl1/conf/train*.yaml; do
${python} -m espnet2.bin.hubert_train --config "${f}" --iterator_type none --normalize none --dry_run true --output_dir out --token_list dummy_token_list --num_classes 10
done
fi

for f in egs2/*/enh_asr1/conf/train_enh_asr*.yaml; do
${python} -m espnet2.bin.enh_s2t_train --config "${f}" --iterator_type none --dry_run true --output_dir out --token_list dummy_token_list
done
Expand Down
14 changes: 13 additions & 1 deletion tools/installers/install_longformer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@ else:
print("false")
EOF
)
python_310_plus=$(python3 <<EOF
from packaging.version import parse as V
import sys
if V("{}.{}.{}".format(*sys.version_info[:3])) >= V("3.10"):
print("true")
else:
print("false")
EOF
)
pt_plus(){
python3 <<EOF
import sys
Expand All @@ -34,7 +44,9 @@ EOF

echo "[INFO] torch_version=${torch_version}"

if ! "${python_36_plus}"; then
if "${python_310_plus}"; then
echo "[WARNING] python>=3.10 is not supported. The install for longformer is skipped."
elif ! "${python_36_plus}"; then
echo "[ERROR] python<3.6 is not supported"
exit 1
else
Expand Down

0 comments on commit b5b2b11

Please sign in to comment.