* Fix CI

* Disable shuffle for yesno.

See https://github.com/k2-fsa/icefall/issues/197
This commit is contained in:
Fangjun Kuang 2022-12-02 10:53:06 +08:00 committed by GitHub
parent 04c9fc9c9f
commit 6533f359c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
29 changed files with 128 additions and 60 deletions

View File

@ -26,6 +26,10 @@ on:
pull_request: pull_request:
types: [labeled] types: [labeled]
concurrency:
group: build_doc-${{ github.ref }}
cancel-in-progress: true
jobs: jobs:
build-doc: build-doc:
if: github.event.label.name == 'doc' || github.event_name == 'push' if: github.event.label.name == 'doc' || github.event_name == 'push'

View File

@ -34,6 +34,10 @@ on:
# nightly build at 15:50 UTC time every day # nightly build at 15:50 UTC time every day
- cron: "50 15 * * *" - cron: "50 15 * * *"
concurrency:
group: run_aishell_2022_06_20-${{ github.ref }}
cancel-in-progress: true
jobs: jobs:
run_aishell_2022_06_20: run_aishell_2022_06_20:
if: github.event.label.name == 'ready' || github.event.label.name == 'run-decode' || github.event_name == 'push' || github.event_name == 'schedule' if: github.event.label.name == 'ready' || github.event.label.name == 'run-decode' || github.event_name == 'push' || github.event_name == 'schedule'

View File

@ -33,6 +33,10 @@ on:
# nightly build at 15:50 UTC time every day # nightly build at 15:50 UTC time every day
- cron: "50 15 * * *" - cron: "50 15 * * *"
concurrency:
group: run_gigaspeech_2022_05_13-${{ github.ref }}
cancel-in-progress: true
jobs: jobs:
run_gigaspeech_2022_05_13: run_gigaspeech_2022_05_13:
if: github.event.label.name == 'ready' || github.event.label.name == 'run-decode' || github.event_name == 'push' || github.event_name == 'schedule' if: github.event.label.name == 'ready' || github.event.label.name == 'run-decode' || github.event_name == 'push' || github.event_name == 'schedule'

View File

@ -33,6 +33,10 @@ on:
# nightly build at 15:50 UTC time every day # nightly build at 15:50 UTC time every day
- cron: "50 15 * * *" - cron: "50 15 * * *"
concurrency:
group: run_librispeech_2022_03_12-${{ github.ref }}
cancel-in-progress: true
jobs: jobs:
run_librispeech_2022_03_12: run_librispeech_2022_03_12:
if: github.event.label.name == 'ready' || github.event.label.name == 'run-decode' || github.event_name == 'push' || github.event_name == 'schedule' if: github.event.label.name == 'ready' || github.event.label.name == 'run-decode' || github.event_name == 'push' || github.event_name == 'schedule'

View File

@ -33,6 +33,10 @@ on:
# nightly build at 15:50 UTC time every day # nightly build at 15:50 UTC time every day
- cron: "50 15 * * *" - cron: "50 15 * * *"
concurrency:
group: run_librispeech_2022_04_29-${{ github.ref }}
cancel-in-progress: true
jobs: jobs:
run_librispeech_2022_04_29: run_librispeech_2022_04_29:
if: github.event.label.name == 'ready' || github.event.label.name == 'run-decode' || github.event_name == 'push' || github.event_name == 'schedule' if: github.event.label.name == 'ready' || github.event.label.name == 'run-decode' || github.event_name == 'push' || github.event_name == 'schedule'

View File

@ -33,6 +33,10 @@ on:
# nightly build at 15:50 UTC time every day # nightly build at 15:50 UTC time every day
- cron: "50 15 * * *" - cron: "50 15 * * *"
concurrency:
group: run_librispeech_2022_05_13-${{ github.ref }}
cancel-in-progress: true
jobs: jobs:
run_librispeech_2022_05_13: run_librispeech_2022_05_13:
if: github.event.label.name == 'ready' || github.event.label.name == 'run-decode' || github.event_name == 'push' || github.event_name == 'schedule' if: github.event.label.name == 'ready' || github.event.label.name == 'run-decode' || github.event_name == 'push' || github.event_name == 'schedule'

View File

@ -33,6 +33,10 @@ on:
# nightly build at 15:50 UTC time every day # nightly build at 15:50 UTC time every day
- cron: "50 15 * * *" - cron: "50 15 * * *"
concurrency:
group: run_librispeech_2022_11_11_zipformer-${{ github.ref }}
cancel-in-progress: true
jobs: jobs:
run_librispeech_2022_11_11_zipformer: run_librispeech_2022_11_11_zipformer:
if: github.event.label.name == 'ready' || github.event.label.name == 'run-decode' || github.event_name == 'push' || github.event_name == 'schedule' if: github.event.label.name == 'ready' || github.event.label.name == 'run-decode' || github.event_name == 'push' || github.event_name == 'schedule'

View File

@ -33,6 +33,10 @@ on:
# nightly build at 15:50 UTC time every day # nightly build at 15:50 UTC time every day
- cron: "50 15 * * *" - cron: "50 15 * * *"
concurrency:
group: run_librispeech_2022_11_14_zipformer_stateless8-${{ github.ref }}
cancel-in-progress: true
jobs: jobs:
run_librispeech_2022_11_14_zipformer_stateless8: run_librispeech_2022_11_14_zipformer_stateless8:
if: github.event.label.name == 'ready' || github.event.label.name == 'run-decode' || github.event_name == 'push' || github.event_name == 'schedule' if: github.event.label.name == 'ready' || github.event.label.name == 'run-decode' || github.event_name == 'push' || github.event_name == 'schedule'

View File

@ -33,6 +33,10 @@ on:
# nightly build at 15:50 UTC time every day # nightly build at 15:50 UTC time every day
- cron: "50 15 * * *" - cron: "50 15 * * *"
concurrency:
group: run_librispeech_2022_11_28_conformer_ctc3-${{ github.ref }}
cancel-in-progress: true
jobs: jobs:
run_librispeech_2022_11_28_conformer_ctc3: run_librispeech_2022_11_28_conformer_ctc3:
if: github.event.label.name == 'ready' || github.event.label.name == 'run-decode' || github.event_name == 'push' || github.event_name == 'schedule' if: github.event.label.name == 'ready' || github.event.label.name == 'run-decode' || github.event_name == 'push' || github.event_name == 'schedule'

View File

@ -16,6 +16,10 @@ on:
# nightly build at 15:50 UTC time every day # nightly build at 15:50 UTC time every day
- cron: "50 15 * * *" - cron: "50 15 * * *"
concurrency:
group: run_librispeech_lstm_transducer_stateless2_2022_09_03-${{ github.ref }}
cancel-in-progress: true
jobs: jobs:
run_librispeech_lstm_transducer_stateless2_2022_09_03: run_librispeech_lstm_transducer_stateless2_2022_09_03:
if: github.event.label.name == 'ready' || github.event.label.name == 'LODR' || github.event.label.name == 'shallow-fusion' || github.event.label.name == 'ncnn' || github.event.label.name == 'onnx' || github.event_name == 'push' || github.event_name == 'schedule' if: github.event.label.name == 'ready' || github.event.label.name == 'LODR' || github.event.label.name == 'shallow-fusion' || github.event.label.name == 'ncnn' || github.event.label.name == 'onnx' || github.event_name == 'push' || github.event_name == 'schedule'

View File

@ -33,6 +33,10 @@ on:
# nightly build at 15:50 UTC time every day # nightly build at 15:50 UTC time every day
- cron: "50 15 * * *" - cron: "50 15 * * *"
concurrency:
group: run_librispeech_pruned_transducer_stateless3_2022_05_13-${{ github.ref }}
cancel-in-progress: true
jobs: jobs:
run_librispeech_pruned_transducer_stateless3_2022_05_13: run_librispeech_pruned_transducer_stateless3_2022_05_13:
if: github.event.label.name == 'onnx' || github.event.label.name == 'ready' || github.event.label.name == 'run-decode' || github.event_name == 'push' || github.event_name == 'schedule' if: github.event.label.name == 'onnx' || github.event.label.name == 'ready' || github.event.label.name == 'run-decode' || github.event_name == 'push' || github.event_name == 'schedule'

View File

@ -33,6 +33,10 @@ on:
# nightly build at 15:50 UTC time every day # nightly build at 15:50 UTC time every day
- cron: "50 15 * * *" - cron: "50 15 * * *"
concurrency:
group: run_librispeech_streaming_2022_06_26-${{ github.ref }}
cancel-in-progress: true
jobs: jobs:
run_librispeech_streaming_2022_06_26: run_librispeech_streaming_2022_06_26:
if: github.event.label.name == 'ready' || github.event.label.name == 'run-decode' || github.event_name == 'push' || github.event_name == 'schedule' if: github.event.label.name == 'ready' || github.event.label.name == 'run-decode' || github.event_name == 'push' || github.event_name == 'schedule'

View File

@ -33,6 +33,10 @@ on:
# nightly build at 15:50 UTC time every day # nightly build at 15:50 UTC time every day
- cron: "50 15 * * *" - cron: "50 15 * * *"
concurrency:
group: run_librispeech_2022_04_19-${{ github.ref }}
cancel-in-progress: true
jobs: jobs:
run_librispeech_2022_04_19: run_librispeech_2022_04_19:
if: github.event.label.name == 'ready' || github.event.label.name == 'run-decode' || github.event_name == 'push' || github.event_name == 'schedule' if: github.event.label.name == 'ready' || github.event.label.name == 'run-decode' || github.event_name == 'push' || github.event_name == 'schedule'

View File

@ -23,6 +23,10 @@ on:
pull_request: pull_request:
types: [labeled] types: [labeled]
concurrency:
group: run_pre_trained_conformer_ctc-${{ github.ref }}
cancel-in-progress: true
jobs: jobs:
run_pre_trained_conformer_ctc: run_pre_trained_conformer_ctc:
if: github.event.label.name == 'ready' || github.event_name == 'push' if: github.event.label.name == 'ready' || github.event_name == 'push'

View File

@ -32,6 +32,10 @@ on:
# nightly build at 15:50 UTC time every day # nightly build at 15:50 UTC time every day
- cron: "50 15 * * *" - cron: "50 15 * * *"
concurrency:
group: run_pre_trained_transducer_stateless_multi_datasets_librispeech_100h-${{ github.ref }}
cancel-in-progress: true
jobs: jobs:
run_pre_trained_transducer_stateless_multi_datasets_librispeech_100h: run_pre_trained_transducer_stateless_multi_datasets_librispeech_100h:
if: github.event.label.name == 'ready' || github.event.label.name == 'run-decode' || github.event_name == 'push' || github.event_name == 'schedule' if: github.event.label.name == 'ready' || github.event.label.name == 'run-decode' || github.event_name == 'push' || github.event_name == 'schedule'

View File

@ -32,6 +32,10 @@ on:
# nightly build at 15:50 UTC time every day # nightly build at 15:50 UTC time every day
- cron: "50 15 * * *" - cron: "50 15 * * *"
concurrency:
group: run_pre_trained_transducer_stateless_multi_datasets_librispeech_960h-${{ github.ref }}
cancel-in-progress: true
jobs: jobs:
run_pre_trained_transducer_stateless_multi_datasets_librispeech_960h: run_pre_trained_transducer_stateless_multi_datasets_librispeech_960h:
if: github.event.label.name == 'ready' || github.event.label.name == 'run-decode' || github.event_name == 'push' || github.event_name == 'schedule' if: github.event.label.name == 'ready' || github.event.label.name == 'run-decode' || github.event_name == 'push' || github.event_name == 'schedule'

View File

@ -23,6 +23,10 @@ on:
pull_request: pull_request:
types: [labeled] types: [labeled]
concurrency:
group: run_pre_trained_transducer_stateless_modified_2_aishell-${{ github.ref }}
cancel-in-progress: true
jobs: jobs:
run_pre_trained_transducer_stateless_modified_2_aishell: run_pre_trained_transducer_stateless_modified_2_aishell:
if: github.event.label.name == 'ready' || github.event_name == 'push' if: github.event.label.name == 'ready' || github.event_name == 'push'

View File

@ -23,6 +23,10 @@ on:
pull_request: pull_request:
types: [labeled] types: [labeled]
concurrency:
group: run_pre_trained_transducer_stateless_modified_aishell-${{ github.ref }}
cancel-in-progress: true
jobs: jobs:
run_pre_trained_transducer_stateless_modified_aishell: run_pre_trained_transducer_stateless_modified_aishell:
if: github.event.label.name == 'ready' || github.event_name == 'push' if: github.event.label.name == 'ready' || github.event_name == 'push'

View File

@ -32,6 +32,10 @@ on:
# nightly build at 15:50 UTC time every day # nightly build at 15:50 UTC time every day
- cron: "50 15 * * *" - cron: "50 15 * * *"
concurrency:
group: run_pre_trained_transducer_stateless-${{ github.ref }}
cancel-in-progress: true
jobs: jobs:
run_pre_trained_transducer_stateless: run_pre_trained_transducer_stateless:
if: github.event.label.name == 'ready' || github.event.label.name == 'run-decode' || github.event_name == 'push' || github.event_name == 'schedule' if: github.event.label.name == 'ready' || github.event.label.name == 'run-decode' || github.event_name == 'push' || github.event_name == 'schedule'

View File

@ -23,6 +23,10 @@ on:
pull_request: pull_request:
types: [labeled] types: [labeled]
concurrency:
group: run_pre_trained_transducer-${{ github.ref }}
cancel-in-progress: true
jobs: jobs:
run_pre_trained_transducer: run_pre_trained_transducer:
if: github.event.label.name == 'ready' || github.event_name == 'push' if: github.event.label.name == 'ready' || github.event_name == 'push'

View File

@ -16,6 +16,10 @@ on:
# nightly build at 15:50 UTC time every day # nightly build at 15:50 UTC time every day
- cron: "50 15 * * *" - cron: "50 15 * * *"
concurrency:
group: run_ptb_rnn_lm_training-${{ github.ref }}
cancel-in-progress: true
jobs: jobs:
run_ptb_rnn_lm_training: run_ptb_rnn_lm_training:
if: github.event.label.name == 'ready' || github.event.label.name == 'rnnlm' || github.event_name == 'push' || github.event_name == 'schedule' if: github.event.label.name == 'ready' || github.event.label.name == 'rnnlm' || github.event_name == 'push' || github.event_name == 'schedule'

View File

@ -23,8 +23,12 @@ on:
pull_request: pull_request:
types: [labeled] types: [labeled]
concurrency:
group: run_wenetspeech_pruned_transducer_stateless2-${{ github.ref }}
cancel-in-progress: true
jobs: jobs:
run_librispeech_pruned_transducer_stateless3_2022_05_13: run_wenetspeech_pruned_transducer_stateless2:
if: github.event.label.name == 'onnx' || github.event.label.name == 'ready' || github.event_name == 'push' || github.event.label.name == 'wenetspeech' if: github.event.label.name == 'onnx' || github.event.label.name == 'ready' || github.event_name == 'push' || github.event.label.name == 'wenetspeech'
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:

View File

@ -21,11 +21,15 @@ on:
branches: branches:
- master - master
pull_request: pull_request:
types: [labeled] branches:
- master
concurrency:
group: run-yesno-recipe-${{ github.ref }}
cancel-in-progress: true
jobs: jobs:
run-yesno-recipe: run-yesno-recipe:
if: github.event.label.name == 'ready' || github.event_name == 'push'
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
matrix: matrix:
@ -61,7 +65,7 @@ jobs:
- name: Install Python dependencies - name: Install Python dependencies
run: | run: |
grep -v '^#' ./requirements-ci.txt | xargs -n 1 -L 1 pip install grep -v '^#' ./requirements-ci.txt | grep -v kaldifst | xargs -n 1 -L 1 pip install
pip uninstall -y protobuf pip uninstall -y protobuf
pip install --no-binary protobuf protobuf pip install --no-binary protobuf protobuf

View File

@ -24,6 +24,10 @@ on:
branches: branches:
- master - master
concurrency:
group: style_check-${{ github.ref }}
cancel-in-progress: true
jobs: jobs:
style_check: style_check:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}

View File

@ -21,26 +21,23 @@ on:
branches: branches:
- master - master
pull_request: pull_request:
types: [labeled] branches:
- master
concurrency:
group: test-${{ github.ref }}
cancel-in-progress: true
jobs: jobs:
test: test:
if: github.event.label.name == 'ready' || github.event_name == 'push'
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
matrix: matrix:
# os: [ubuntu-18.04, macos-10.15] os: [ubuntu-latest]
# disable macOS test for now. python-version: ["3.8"]
os: [ubuntu-18.04] torch: ["1.10.0"]
python-version: [3.7, 3.8] torchaudio: ["0.10.0"]
torch: ["1.8.0", "1.11.0"] k2-version: ["1.23.2.dev20221201"]
torchaudio: ["0.8.0", "0.11.0"]
k2-version: ["1.15.1.dev20220427"]
exclude:
- torch: "1.8.0"
torchaudio: "0.11.0"
- torch: "1.11.0"
torchaudio: "0.8.0"
fail-fast: false fail-fast: false
@ -67,11 +64,7 @@ jobs:
# numpy 1.20.x does not support python 3.6 # numpy 1.20.x does not support python 3.6
pip install numpy==1.19 pip install numpy==1.19
pip install torch==${{ matrix.torch }}+cpu -f https://download.pytorch.org/whl/cpu/torch_stable.html pip install torch==${{ matrix.torch }}+cpu -f https://download.pytorch.org/whl/cpu/torch_stable.html
if [[ ${{ matrix.torchaudio }} == "0.11.0" ]]; then
pip install torchaudio==${{ matrix.torchaudio }}+cpu -f https://download.pytorch.org/whl/cpu/torch_stable.html pip install torchaudio==${{ matrix.torchaudio }}+cpu -f https://download.pytorch.org/whl/cpu/torch_stable.html
else
pip install torchaudio==${{ matrix.torchaudio }}
fi
pip install k2==${{ matrix.k2-version }}+cpu.torch${{ matrix.torch }} -f https://k2-fsa.org/nightly/ pip install k2==${{ matrix.k2-version }}+cpu.torch${{ matrix.torch }} -f https://k2-fsa.org/nightly/
pip install git+https://github.com/lhotse-speech/lhotse pip install git+https://github.com/lhotse-speech/lhotse
@ -81,7 +74,6 @@ jobs:
pip install kaldifst pip install kaldifst
pip install onnxruntime pip install onnxruntime
pip install -r requirements.txt pip install -r requirements.txt
- name: Install graphviz - name: Install graphviz
@ -124,7 +116,6 @@ jobs:
cd ../transducer_stateless cd ../transducer_stateless
pytest -v -s pytest -v -s
if [[ ${{ matrix.torchaudio }} == "0.10.0" ]]; then
cd ../transducer cd ../transducer
pytest -v -s pytest -v -s
@ -133,7 +124,6 @@ jobs:
cd ../transducer_lstm cd ../transducer_lstm
pytest -v -s pytest -v -s
fi
- name: Run tests - name: Run tests
if: startsWith(matrix.os, 'macos') if: startsWith(matrix.os, 'macos')
@ -164,7 +154,6 @@ jobs:
cd ../transducer_stateless cd ../transducer_stateless
pytest -v -s pytest -v -s
if [[ ${{ matrix.torchaudio }} == "0.10.0" ]]; then
cd ../transducer cd ../transducer
pytest -v -s pytest -v -s
@ -173,4 +162,3 @@ jobs:
cd ../transducer_lstm cd ../transducer_lstm
pytest -v -s pytest -v -s
fi

View File

@ -93,7 +93,6 @@ def main():
print(f"{model_file} exists - skipping") print(f"{model_file} exists - skipping")
return return
shutil.copyfile(model_file, f"{lang_dir}/bpe.model") shutil.copyfile(model_file, f"{lang_dir}/bpe.model")

View File

@ -2230,9 +2230,7 @@ def modified_beam_search_rnnlm_LODR(
log_probs_shape = k2.ragged.create_ragged_shape2( log_probs_shape = k2.ragged.create_ragged_shape2(
row_splits=row_splits, cached_tot_size=log_probs.numel() row_splits=row_splits, cached_tot_size=log_probs.numel()
) )
ragged_log_probs = k2.RaggedTensor( ragged_log_probs = k2.RaggedTensor(shape=log_probs_shape, value=log_probs)
shape=log_probs_shape, value=log_probs
)
""" """
for all hyps with a non-blank new token, score this token. for all hyps with a non-blank new token, score this token.
It is a little confusing here because this for-loop It is a little confusing here because this for-loop
@ -2267,10 +2265,7 @@ def modified_beam_search_rnnlm_LODR(
# forward RNNLM to get new states and scores # forward RNNLM to get new states and scores
if len(token_list) != 0: if len(token_list) != 0:
tokens_to_score = ( tokens_to_score = (
torch.tensor(token_list) torch.tensor(token_list).to(torch.int64).to(device).reshape(-1, 1)
.to(torch.int64)
.to(device)
.reshape(-1, 1)
) )
hs = torch.cat(hs, dim=1).to(device) hs = torch.cat(hs, dim=1).to(device)
@ -2304,9 +2299,7 @@ def modified_beam_search_rnnlm_LODR(
state_cost = hyp.state_cost.forward_one_step(new_token) state_cost = hyp.state_cost.forward_one_step(new_token)
# calculate the score of the latest token # calculate the score of the latest token
current_ngram_score = ( current_ngram_score = state_cost.lm_score - hyp.state_cost.lm_score
state_cost.lm_score - hyp.state_cost.lm_score
)
assert current_ngram_score <= 0.0, ( assert current_ngram_score <= 0.0, (
state_cost.lm_score, state_cost.lm_score,

View File

@ -52,17 +52,9 @@ def test_scaled_conv2d():
torch.jit.script(conv2d) torch.jit.script(conv2d)
def test_activation_balancer():
act = ActivationBalancer(
channel_dim=1, max_abs=10.0, min_positive=0.05, max_positive=1.0
)
torch.jit.script(act)
def main(): def main():
test_scaled_conv1d() test_scaled_conv1d()
test_scaled_conv2d() test_scaled_conv2d()
test_activation_balancer()
if __name__ == "__main__": if __name__ == "__main__":

View File

@ -121,7 +121,7 @@ class YesNoAsrDataModule(DataModule):
group.add_argument( group.add_argument(
"--shuffle", "--shuffle",
type=str2bool, type=str2bool,
default=True, default=False,
help="When enabled (=default), the examples will be " help="When enabled (=default), the examples will be "
"shuffled for each epoch.", "shuffled for each epoch.",
) )