Skip to content

Commit 6d8167d

Browse files
committed
Remove flair and spacy tests as they are incompatible with numpy 2.0
1 parent d882441 commit 6d8167d

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/pythonapp.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
run: |
3131
pip install uv
3232
uv pip install --system ctc-segmentation sacrebleu # ctc-segmentation is funky with uv due to their oldest-supported-numpy dependency
33-
uv pip install --system -r requirements.txt torch==2.6.0+cpu torchaudio==2.6.0+cpu --extra-index-url https://download.pytorch.org/whl/cpu k2==1.24.4.dev20250307+cpu.torch2.6.0 --find-links https://k2-fsa.github.io/k2/cpu.html kaldilm==1.15.1 spacy==3.7.4 flair==0.13.1 gensim==4.3.2
33+
uv pip install --system -r requirements.txt torch==2.6.0+cpu torchaudio==2.6.0+cpu --extra-index-url https://download.pytorch.org/whl/cpu k2==1.24.4.dev20250307+cpu.torch2.6.0 --find-links https://k2-fsa.github.io/k2/cpu.html kaldilm==1.15.1 gensim==4.3.2
3434
uv pip install --system --editable . --no-deps # already installed pinned deps from requirements.txt, we're good
3535
- name: Install sox
3636
run: |

conftest.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ def pytest_generate_tests(metafunc):
1313
collect_ignore = [
1414
"setup.py",
1515
"speechbrain/lobes/models/huggingface_transformers/mert.py",
16+
"speechbrain/lobes/models/flair",
17+
"speechbrain/lobes/models/spacy",
1618
]
1719
try:
1820
import numba # noqa: F401

tests/.run-doctests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ set -e -u -o pipefail
55
# > pytest --doctest-modules speechbrain/
66
# However, we take this more complex approach to avoid testing files not
77
# tracked by git. We filter out tests that require optional dependencies.
8-
avoid="transducer_loss.py\|fairseq_wav2vec.py\|huggingface_wav2vec.py\|bleu.py\|ctc_segmentation.py\|check_url.py\|huggingface_whisper.py\|language_model.py\|vocos.py\|discrete_ssl.py\|lobes/flair|lobes/spacy"
8+
avoid="transducer_loss.py\|fairseq_wav2vec.py\|huggingface_wav2vec.py\|bleu.py\|ctc_segmentation.py\|check_url.py\|huggingface_whisper.py\|language_model.py\|vocos.py\|discrete_ssl.py\|lobes/models/flair\|lobes/models/spacy"
99
git ls-files speechbrain | grep -e "\.py$" | grep -v $avoid | xargs pytest --doctest-modules

0 commit comments

Comments
 (0)