Commit a47c3c3
authored
[GuideLLM Refactor] Replace librosa, pydub, and soundfile with torchcodec (#411)
## TODO
- [ ] ~~More flexible version locking in multimodal extras group~~
- Goal with this was to add locking for different torchcodec/torch
versions but honestly its not worth the hassle
- [x] Check for multi-modal libs being installed
- [ ] More testing on `encode_audio`
## Summary
<!--
Include a short paragraph of the changes introduced in this PR.
If this PR requires additional context or rationale, explain why
the changes are necessary.
-->
Replaces audio processing libraries with `torchcodec` which eliminates
19 dependencies and brings us inline with what HuggingFace `datasets` is
doing.
## Details
<!--
Provide a detailed list of all changes introduced in this pull request.
-->
-
## Test Plan
<!--
List the steps needed to test this PR.
-->
- Run against audio server with
```bash
guidellm benchmark run \
--target http://localhost:8000 \
--profile "synchronous" \
--max-requests 20 \
--request-type "audio_transcriptions" \
--data "openslr/librispeech_asr" \
--data-args '{"name": "clean", "split": "test"}'
```
---
- [x] "I certify that all code in this PR is my own, except as noted
below."
## Use of AI
- [x] Includes AI-assisted code completion
- [ ] Includes code generated by an AI application
- [ ] Includes AI-generated tests (NOTE: AI written tests should have a
docstring that includes `## WRITTEN BY AI ##`)File tree
7 files changed
+1614
-1275
lines changed- src/guidellm
- data
- preprocessors
- utils
- extras
7 files changed
+1614
-1275
lines changedLarge diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
66 | | - | |
| 65 | + | |
67 | 66 | | |
68 | 67 | | |
69 | 68 | | |
70 | | - | |
71 | 69 | | |
72 | 70 | | |
73 | 71 | | |
74 | 72 | | |
75 | 73 | | |
76 | | - | |
77 | 74 | | |
78 | 75 | | |
79 | 76 | | |
80 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
81 | 82 | | |
82 | 83 | | |
83 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
84 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
85 | 96 | | |
86 | 97 | | |
87 | 98 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | | - | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
21 | 42 | | |
22 | | - | |
| 43 | + | |
23 | 44 | | |
24 | 45 | | |
25 | 46 | | |
| |||
92 | 113 | | |
93 | 114 | | |
94 | 115 | | |
95 | | - | |
| 116 | + | |
96 | 117 | | |
97 | 118 | | |
98 | 119 | | |
| |||
120 | 141 | | |
121 | 142 | | |
122 | 143 | | |
123 | | - | |
| 144 | + | |
124 | 145 | | |
125 | 146 | | |
126 | 147 | | |
| |||
200 | 221 | | |
201 | 222 | | |
202 | 223 | | |
203 | | - | |
| 224 | + | |
204 | 225 | | |
205 | 226 | | |
206 | 227 | | |
| |||
223 | 244 | | |
224 | 245 | | |
225 | 246 | | |
226 | | - | |
| 247 | + | |
227 | 248 | | |
228 | 249 | | |
229 | 250 | | |
| |||
250 | 271 | | |
251 | 272 | | |
252 | 273 | | |
253 | | - | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
254 | 277 | | |
255 | 278 | | |
256 | 279 | | |
| |||
288 | 311 | | |
289 | 312 | | |
290 | 313 | | |
291 | | - | |
| 314 | + | |
292 | 315 | | |
293 | 316 | | |
294 | 317 | | |
| |||
345 | 368 | | |
346 | 369 | | |
347 | 370 | | |
348 | | - | |
| 371 | + | |
349 | 372 | | |
350 | 373 | | |
351 | 374 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | 3 | | |
10 | 4 | | |
11 | 5 | | |
12 | 6 | | |
13 | 7 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | 8 | | |
21 | 9 | | |
22 | 10 | | |
0 commit comments