Repository navigation
165 lines (162 loc) · 6.45 KB
/
Copy pathtest-numpy-compatibility.yml
File metadata and controls
165 lines (162 loc) · 6.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
name: Validate NumPy compatibility
on:
pull_request:
paths:
- "setup.py"
- "funasr/__init__.py"
- "funasr/cli.py"
- "tests/test_cli.py"
- "funasr/auto/auto_model.py"
- "funasr/tokenizer/sentencepiece_tokenizer.py"
- "funasr/tokenizer/char_tokenizer.py"
- "funasr/tokenizer/phoneme_tokenizer.py"
- "tests/test_char_tokenizer_non_linguistic_symbols.py"
- "tests/test_sentencepiece_tokenizer.py"
- "tests/test_speaker_optional_dependency.py"
- "funasr/utils/load_utils.py"
- "funasr/bin/realtime_ws.py"
- "tests/test_realtime_ws_service.py"
- "tests/test_realtime_ws_hf_overrides.py"
- "funasr/utils/timestamp_tools.py"
- "funasr/models/paraformer/model.py"
- "funasr/models/contextual_paraformer/model.py"
- "funasr/models/seaco_paraformer/model.py"
- "tests/test_timestamp_tools.py"
- "tests/test_punc_model_none.py"
- "tests/test_paraformer_empty_token_batch.py"
- "tests/test_paraformer_hotword_file.py"
- "funasr/models/ct_transformer_streaming/model.py"
- "tests/test_ct_transformer_streaming_empty_input.py"
- "tests/test_pcm_input_format.py"
- "tests/test_load_audio_bytes.py"
- "funasr/frontends/**"
- "funasr/models/normalize/utterance_mvn.py"
- "tests/test_utterance_mvn.py"
- "funasr/models/emotion2vec/**"
- "funasr/models/campplus/**"
- "funasr/models/sense_voice/model.py"
- "funasr/models/eend/utils/feature.py"
- "tests/test_numpy_compatibility.py"
- "tests/test_numpy_cluster_compatibility.py"
- "tests/test_cluster_backend.py"
- "tests/test_eend_feature_compatibility.py"
- "tests/test_sensevoice_word_timestamps.py"
- "tests/test_pypi_metadata.py"
- ".github/workflows/test-numpy-compatibility.yml"
push:
branches: [main]
paths:
- "setup.py"
- "funasr/__init__.py"
- "funasr/cli.py"
- "tests/test_cli.py"
- "funasr/auto/auto_model.py"
- "funasr/tokenizer/sentencepiece_tokenizer.py"
- "funasr/tokenizer/char_tokenizer.py"
- "funasr/tokenizer/phoneme_tokenizer.py"
- "tests/test_char_tokenizer_non_linguistic_symbols.py"
- "tests/test_sentencepiece_tokenizer.py"
- "tests/test_speaker_optional_dependency.py"
- "funasr/utils/load_utils.py"
- "funasr/bin/realtime_ws.py"
- "tests/test_realtime_ws_service.py"
- "tests/test_realtime_ws_hf_overrides.py"
- "funasr/utils/timestamp_tools.py"
- "funasr/models/paraformer/model.py"
- "funasr/models/contextual_paraformer/model.py"
- "funasr/models/seaco_paraformer/model.py"
- "tests/test_timestamp_tools.py"
- "tests/test_punc_model_none.py"
- "tests/test_paraformer_empty_token_batch.py"
- "tests/test_paraformer_hotword_file.py"
- "funasr/models/ct_transformer_streaming/model.py"
- "tests/test_ct_transformer_streaming_empty_input.py"
- "tests/test_pcm_input_format.py"
- "tests/test_load_audio_bytes.py"
- "funasr/frontends/**"
- "funasr/models/normalize/utterance_mvn.py"
- "tests/test_utterance_mvn.py"
- "funasr/models/emotion2vec/**"
- "funasr/models/campplus/**"
- "funasr/models/sense_voice/model.py"
- "funasr/models/eend/utils/feature.py"
- "tests/test_numpy_compatibility.py"
- "tests/test_numpy_cluster_compatibility.py"
- "tests/test_cluster_backend.py"
- "tests/test_eend_feature_compatibility.py"
- "tests/test_sensevoice_word_timestamps.py"
- "tests/test_pypi_metadata.py"
- ".github/workflows/test-numpy-compatibility.yml"
permissions:
contents: read
jobs:
numpy-compatibility:
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
numpy: ["1.26.4", "2.4.0"]
env:
OMP_NUM_THREADS: "1"
MKL_NUM_THREADS: "1"
NUMBA_NUM_THREADS: "1"
HF_HUB_OFFLINE: "1"
NUMPY_VERSION: ${{ matrix.numpy }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
- name: Install audio decoder
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -y ffmpeg
ffmpeg -version
- name: Install CPU runtime and requested NumPy version
run: |
python -m pip install torch==2.10.0 torchaudio==2.10.0 --index-url https://download.pytorch.org/whl/cpu
python -m pip install "numpy==$NUMPY_VERSION" -e . pytest websockets einops pytorch-wpe --report install-report.json
- name: Record resolved environment and validate dependencies
run: |
git rev-parse HEAD | tee source-commit.txt
python -c "import numpy, os; assert numpy.__version__ == os.environ['NUMPY_VERSION']"
python -m pip freeze | tee resolved-dependencies.txt
python -m pip check | tee pip-check.txt
- name: Exercise real frontend, masking, import, array and CLI boundaries
run: |
python -m pytest -q \
tests/test_numpy_compatibility.py \
tests/test_utterance_mvn.py \
tests/test_numpy_cluster_compatibility.py \
tests/test_cluster_backend.py \
tests/test_speaker_optional_dependency.py \
tests/test_eend_feature_compatibility.py \
tests/test_pypi_metadata.py \
tests/test_sensevoice_word_timestamps.py \
tests/test_sentencepiece_tokenizer.py \
tests/test_char_tokenizer_non_linguistic_symbols.py \
tests/test_pcm_input_format.py \
tests/test_realtime_ws_service.py \
tests/test_realtime_ws_hf_overrides.py \
tests/test_load_audio_bytes.py \
tests/test_timestamp_tools.py \
tests/test_punc_model_none.py \
tests/test_paraformer_empty_token_batch.py \
tests/test_paraformer_hotword_file.py \
tests/test_ct_transformer_streaming_empty_input.py \
tests/test_cli.py \
--junitxml=numpy-results.xml
- uses: actions/upload-artifact@v4
if: always()
with:
name: numpy-${{ matrix.numpy }}-evidence
path: |
resolved-dependencies.txt
pip-check.txt
numpy-results.xml
source-commit.txt
install-report.json