Skip to content

Commit

Permalink
Merge pull request espnet#4348 from kamo-naoyuki/1.11.0
Browse files Browse the repository at this point in the history
Add pytorch=1.10.2 and 1.11.0 to ci configurations
  • Loading branch information
kamo-naoyuki authored May 13, 2022
2 parents 1b12410 + 9cfd6af commit f840b81
Show file tree
Hide file tree
Showing 94 changed files with 388 additions and 373 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/centos7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
# ImportError: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found
# (required by /__w/espnet/espnet/tools/venv/envs/espnet/lib/python3.6/site-packages/pyworld/pyworld.cpython-36m-x86_64-linux-gnu.so)
# NOTE(kamo): The issue doens't exist for python3.7?
TH_VERSION: 1.10.1
TH_VERSION: 1.11.0
CHAINER_VERSION: 6.0.0
USE_CONDA: true
CC: /opt/rh/devtoolset-7/root/usr/bin/gcc
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ jobs:
matrix:
os: [ubuntu-18.04]
python-version: [3.7]
pytorch-version: [1.4.0, 1.5.1, 1.6.0, 1.7.1, 1.8.1, 1.9.1, 1.10.1]
pytorch-version: [1.4.0, 1.5.1, 1.6.0, 1.7.1, 1.8.1, 1.9.1, 1.10.2, 1.11.0]
chainer-version: [6.0.0]
# NOTE(kamo): Conda is tested by Circle-CI
use-conda: [false]
include:
- os: ubuntu-20.04
python-version: 3.8
pytorch-version: 1.10.1
pytorch-version: 1.11.0
chainer-verssion: 6.0.0
use-conda: false
- os: ubuntu-20.04
python-version: 3.9
pytorch-version: 1.10.1
pytorch-version: 1.11.0
chainer-verssion: 6.0.0
use-conda: false
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/debian9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
image: debian:9
env:
ESPNET_PYTHON_VERSION: 3.7
TH_VERSION: 1.10.1
TH_VERSION: 1.11.0
CHAINER_VERSION: 6.0.0
USE_CONDA: true
CC: gcc-6
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 @@ -16,7 +16,7 @@ jobs:
matrix:
os: [ubuntu-latest]
python-version: [3.9]
pytorch-version: [1.10.1]
pytorch-version: [1.11.0]
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v1
Expand Down
8 changes: 4 additions & 4 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ pull_request_rules:
- "label=auto-merge"
- "check-success=test_centos7"
- "check-success=test_debian9"
- "check-success=linter_and_test (ubuntu-18.04, 3.7, 1.3.1, 6.0.0, false)"
- "check-success=linter_and_test (ubuntu-18.04, 3.7, 1.4.0, 6.0.0, false)"
- "check-success=linter_and_test (ubuntu-18.04, 3.7, 1.5.1, 6.0.0, false)"
- "check-success=linter_and_test (ubuntu-18.04, 3.7, 1.6.0, 6.0.0, false)"
- "check-success=linter_and_test (ubuntu-18.04, 3.7, 1.7.1, 6.0.0, false)"
- "check-success=linter_and_test (ubuntu-18.04, 3.7, 1.8.1, 6.0.0, false)"
- "check-success=linter_and_test (ubuntu-18.04, 3.7, 1.9.1, 6.0.0, false)"
- "check-success=linter_and_test (ubuntu-18.04, 3.7, 1.10.1, 6.0.0, false)"
- "check-success=linter_and_test (ubuntu-20.04, 3.8, 1.10.1, false, 6.0.0)"
- "check-success=linter_and_test (ubuntu-20.04, 3.9, 1.10.1, false, 6.0.0)"
- "check-success=linter_and_test (ubuntu-18.04, 3.7, 1.10.2, 6.0.0, false)"
- "check-success=linter_and_test (ubuntu-18.04, 3.7, 1.11.0, 6.0.0, false)"
- "check-success=linter_and_test (ubuntu-20.04, 3.8, 1.11.0, false, 6.0.0)"
- "check-success=linter_and_test (ubuntu-20.04, 3.9, 1.11.0, false, 6.0.0)"
- "check-success=test_import (ubuntu-latest, 3.9, 1.10.1)"
actions:
merge:
Expand Down
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@

# ESPnet: end-to-end speech processing toolkit

| system/pytorch ver. | 1.4.0 | 1.5.1 | 1.6.0 | 1.7.1 | 1.8.1 | 1.9.1 | 1.10.1 |
| :---------------------: | :--------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------: |
| 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) |
| debian9/python3.7/conda | | | | | | | [![debian9](https://github.com/espnet/espnet/workflows/debian9/badge.svg)](https://github.com/espnet/espnet/actions?query=workflow%3Adebian9) |
| centos7/python3.7/conda | | | | | | | [![centos7](https://github.com/espnet/espnet/workflows/centos7/badge.svg)](https://github.com/espnet/espnet/actions?query=workflow%3Acentos7) |
| doc/python3.8 | | | | | | | [![doc](https://github.com/espnet/espnet/workflows/doc/badge.svg)](https://github.com/espnet/espnet/actions?query=workflow%3Adoc) |
|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|
| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
|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)|
|debian9/python3.7/conda||||||||[![debian9](https://github.com/espnet/espnet/workflows/debian9/badge.svg)](https://github.com/espnet/espnet/actions?query=workflow%3Adebian9)|
|centos7/python3.7/conda||||||||[![centos7](https://github.com/espnet/espnet/workflows/centos7/badge.svg)](https://github.com/espnet/espnet/actions?query=workflow%3Acentos7)|
|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/)
Expand Down
2 changes: 1 addition & 1 deletion ci/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ python3 -m pip freeze
# Check pytorch version
python3 <<EOF
import torch
from distutils.version import LooseVersion as L
from packaging.version import parse as L
version = '$TH_VERSION'.split(".")
next_version = f"{version[0]}.{version[1]}.{int(version[2]) + 1}"
Expand Down
14 changes: 7 additions & 7 deletions ci/test_integration_espnet2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ echo "==== use_streaming, feats_type=raw, token_types=bpe, model_conf.extract_fe
--feats_normalize "utterance_mvn" --lm-args "--max_epoch=1" --python "${python}" \
--asr-args "--model_conf extract_feats_in_collect_stats=false --max_epoch=1 --encoder=contextual_block_transformer --decoder=transformer
--encoder_conf block_size=40 --encoder_conf hop_size=16 --encoder_conf look_ahead=16"

if python3 -c "import k2" &> /dev/null; then
echo "==== use_k2, num_paths > nll_batch_size, feats_type=raw, token_types=bpe, model_conf.extract_feats_in_collect_stats=False, normalize=utt_mvn ==="
./run.sh --num_paths 500 --nll_batch_size 20 --use_k2 true --ngpu 0 --stage 12 --stop-stage 13 --skip-upload false --feats-type "raw" --token-type "bpe" \
--feats_normalize "utterance_mvn" --lm-args "--max_epoch=1" --python "${python}" \
--asr-args "--model_conf extract_feats_in_collect_stats=false --max_epoch=1"

echo "==== use_k2, num_paths == nll_batch_size, feats_type=raw, token_types=bpe, model_conf.extract_feats_in_collect_stats=False, normalize=utt_mvn ==="
./run.sh --num_paths 20 --nll_batch_size 20 --use_k2 true --ngpu 0 --stage 12 --stop-stage 13 --skip-upload false --feats-type "raw" --token-type "bpe" \
--feats_normalize "utterance_mvn" --lm-args "--max_epoch=1" --python "${python}" \
Expand All @@ -68,15 +68,15 @@ rm -rf exp dump data
# NOTE(kan-bayashi): pytorch 1.4 - 1.6 works but 1.6 has a problem with CPU,
# so we test this recipe using only pytorch > 1.6 here.
# See also: https://github.com/pytorch/pytorch/issues/42446
if python3 -c 'import torch as t; from distutils.version import LooseVersion as L; assert L(t.__version__) > L("1.6")' &> /dev/null; then
if python3 -c 'import torch as t; from packaging.version import parse as L; assert L(t.__version__) > L("1.6")' &> /dev/null; then
./run.sh --fs 22050 --tts_task gan_tts --feats_extract linear_spectrogram --feats_normalize none --inference_model latest.pth \
--ngpu 0 --stop-stage 8 --skip-upload false --train-args "--num_iters_per_epoch 1 --max_epoch 1" --python "${python}"
rm -rf exp dump data
fi
cd "${cwd}"

# [ESPnet2] test enh recipe
if python -c 'import torch as t; from distutils.version import LooseVersion as L; assert L(t.__version__) >= L("1.2.0")' &> /dev/null; then
if python -c 'import torch as t; from packaging.version import parse as L; assert L(t.__version__) >= L("1.2.0")' &> /dev/null; then
cd ./egs2/mini_an4/enh1
echo "==== [ESPnet2] ENH ==="
./run.sh --stage 1 --stop-stage 1 --python "${python}"
Expand All @@ -101,7 +101,7 @@ if python3 -c "import fairseq" &> /dev/null; then
fi

# [ESPnet2] test enh_asr1 recipe
if python -c 'import torch as t; from distutils.version import LooseVersion as L; assert L(t.__version__) >= L("1.2.0")' &> /dev/null; then
if python -c 'import torch as t; from packaging.version import parse as L; assert L(t.__version__) >= L("1.2.0")' &> /dev/null; then
cd ./egs2/mini_an4/enh_asr1
echo "==== [ESPnet2] ENH_ASR ==="
./run.sh --ngpu 0 --stage 0 --stop-stage 15 --skip-upload_hf false --feats-type "raw" --spk-num 1 --enh_asr_args "--max_epoch=1 --enh_separator_conf num_spk=1" --python "${python}"
Expand All @@ -122,7 +122,7 @@ done
for t in ${token_types}; do
./run.sh --stage 5 --stop-stage 5 --tgt_token_type "${t}" --src_token_type "${t}" --python "${python}"
done
for t in ${feats_types}; do
for t in ${feats_types}; do
for t2 in ${token_types}; do
echo "==== feats_type=${t}, token_types=${t2} ==="
./run.sh --ngpu 0 --stage 6 --stop-stage 13 --skip-upload false --feats-type "${t}" --tgt_token_type "${t2}" --src_token_type "${t2}" \
Expand All @@ -147,7 +147,7 @@ cd "${cwd}"
# [ESPnet2] Validate configuration files
echo "<blank>" > dummy_token_list
echo "==== [ESPnet2] Validation configuration files ==="
if python3 -c 'import torch as t; from distutils.version import LooseVersion as L; assert L(t.__version__) >= L("1.8.0")' &> /dev/null; then
if python3 -c 'import torch as t; from packaging.version import parse as L; assert L(t.__version__) >= L("1.8.0")' &> /dev/null; then
for f in egs2/*/asr1/conf/train_asr*.yaml; do
if [ "$f" == "egs2/fsc/asr1/conf/train_asr.yaml" ]; then
if ! python3 -c "import s3prl" > /dev/null; then
Expand Down
12 changes: 6 additions & 6 deletions egs2/TEMPLATE/asr1/asr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,7 @@ if ! "${skip_train}"; then
log "LM collect-stats started... log: '${_logdir}/stats.*.log'"
# NOTE: --*_shape_file doesn't require length information if --batch_type=unsorted,
# but it's used only for deciding the sample ids.
# shellcheck disable=SC2086
# shellcheck disable=SC2046,SC2086
${train_cmd} JOB=1:"${_nj}" "${_logdir}"/stats.JOB.log \
${python} -m espnet2.bin.lm_train \
--collect_stats true \
Expand All @@ -771,7 +771,7 @@ if ! "${skip_train}"; then
--train_shape_file "${_logdir}/train.JOB.scp" \
--valid_shape_file "${_logdir}/dev.JOB.scp" \
--output_dir "${_logdir}/stats.JOB" \
${_opts} ${lm_args} || { cat "${_logdir}"/stats.1.log; exit 1; }
${_opts} ${lm_args} || { cat $(grep -l -i error "${_logdir}"/stats.*.log) ; exit 1; }

# 4. Aggregate shape files
_opts=
Expand Down Expand Up @@ -967,7 +967,7 @@ if ! "${skip_train}"; then
# NOTE: --*_shape_file doesn't require length information if --batch_type=unsorted,
# but it's used only for deciding the sample ids.

# shellcheck disable=SC2086
# shellcheck disable=SC2046,SC2086
${train_cmd} JOB=1:"${_nj}" "${_logdir}"/stats.JOB.log \
${python} -m espnet2.bin.asr_train \
--collect_stats true \
Expand All @@ -985,7 +985,7 @@ if ! "${skip_train}"; then
--train_shape_file "${_logdir}/train.JOB.scp" \
--valid_shape_file "${_logdir}/valid.JOB.scp" \
--output_dir "${_logdir}/stats.JOB" \
${_opts} ${asr_args} || { cat "${_logdir}"/stats.1.log; exit 1; }
${_opts} ${asr_args} || { cat $(grep -l -i error "${_logdir}"/stats.*.log) ; exit 1; }

# 4. Aggregate shape files
_opts=
Expand Down Expand Up @@ -1242,7 +1242,7 @@ if ! "${skip_eval}"; then

# 2. Submit decoding jobs
log "Decoding started... log: '${_logdir}/asr_inference.*.log'"
# shellcheck disable=SC2086
# shellcheck disable=SC2046,SC2086
${_cmd} --gpu "${_ngpu}" JOB=1:"${_nj}" "${_logdir}"/asr_inference.JOB.log \
${python} -m ${asr_inference_tool} \
--batch_size ${batch_size} \
Expand All @@ -1252,7 +1252,7 @@ if ! "${skip_eval}"; then
--asr_train_config "${asr_exp}"/config.yaml \
--asr_model_file "${asr_exp}"/"${inference_asr_model}" \
--output_dir "${_logdir}"/output.JOB \
${_opts} ${inference_args}
${_opts} ${inference_args} || { cat $(grep -l -i error "${_logdir}"/asr_inference.*.log) ; exit 1; }

# 3. Concatenates the output files from each jobs
for f in token token_int score text; do
Expand Down
Loading

0 comments on commit f840b81

Please sign in to comment.