-
Notifications
You must be signed in to change notification settings - Fork 73
Expand file tree
/
Copy pathtest-definitions.ts
More file actions
314 lines (263 loc) · 8.29 KB
/
Copy pathtest-definitions.ts
File metadata and controls
314 lines (263 loc) · 8.29 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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
// Real SDK tests
import type { TestDefinition } from "@tetherto/qvac-test-suite";
import { completionTests } from "./completion-tests.js";
import { transcriptionTests } from "./transcription-tests.js";
import { transcribeStreamEventsTests } from "./transcribe-stream-events-tests.js";
import { embeddingTests } from "./embedding-tests.js";
import { ragTests } from "./rag-tests.js";
import { translationIndicTransTests } from "./translation-indictrans-tests.js";
import { translationBergamotTests } from "./translation-bergamot-tests.js";
import { translationBergamotCacheTests } from "./translation-bergamot-cache-tests.js";
import { translationLlmTests } from "./translation-llm-tests.js";
import { translationSalamandraTests } from "./translation-salamandra-tests.js";
import { translationAfriquegemmaTests } from "./translation-afriquegemma-tests.js";
import { modelInfoTests } from "./model-info-tests.js";
import { kvCacheTests } from "./kv-cache-tests.js";
import { errorTests } from "./error-tests.js";
import { toolsTests } from "./tools-tests.js";
import { ocrTests } from "./ocr-tests.js";
import { classificationTests } from "./classification-tests.js";
import { ttsTests } from "./tts-tests.js";
import { configReloadTests } from "./config-reload-tests.js";
import { loggingTests } from "./logging-tests.js";
import { registryTests } from "./registry-tests.js";
import { shardedModelTests } from "./sharded-model-tests.js";
import { httpEmbeddingTests } from "./http-embedding-tests.js";
import { parakeetTests } from "./parakeet-tests.js";
import { parakeetStreamTests } from "./parakeet-stream-tests.js";
import { bciTests } from "./bci-tests.js";
import { visionTests } from "./vision-tests.js";
import { downloadTests } from "./download-tests.js";
import { delegatedInferenceTests } from "./delegated-inference-tests.js";
import { diffusionTests } from "./diffusion-tests.js";
import { finetuneTests } from "./finetune-tests.js";
import { lifecycleTests } from "./lifecycle-tests.js";
import { configTests } from "./config-tests.js";
import { noLingeringBareTests } from "./no-lingering-bare-tests.js";
import { wrongModelTests } from "./wrong-model-tests.js";
import { multiGpuTests } from "./multi-gpu-tests.js";
import { cancellationTests } from "./cancellation-tests.js";
import { vlaTests } from "./vla-tests.js";
// Model loading tests
export const modelLoadLlm: TestDefinition = {
testId: "model-load-llm",
params: {},
expectation: { validation: "type", expectedType: "string" },
suites: ["smoke"],
metadata: {
category: "model",
dependency: "none",
estimatedDurationMs: 60000,
},
};
export const modelLoadEmbedding: TestDefinition = {
testId: "model-load-embedding",
params: {},
expectation: { validation: "type", expectedType: "string" },
suites: ["smoke"],
metadata: {
category: "model",
dependency: "none",
estimatedDurationMs: 60000,
},
};
export const modelLoadOcr: TestDefinition = {
testId: "model-load-ocr",
params: {},
expectation: { validation: "type", expectedType: "string" },
suites: ["smoke"],
metadata: {
category: "model",
dependency: "none",
estimatedDurationMs: 90000,
},
};
export const modelLoadInvalid: TestDefinition = {
testId: "model-load-invalid",
params: {
modelType: "llm",
modelPath: "/invalid/path/nonexistent-model.gguf",
},
expectation: {
validation: "throws-error",
errorContains: "failed to locate",
},
suites: ["smoke"],
metadata: {
category: "model",
dependency: "none",
estimatedDurationMs: 5000,
},
};
export const modelUnload: TestDefinition = {
testId: "model-unload",
params: { shouldClearStorage: false },
expectation: { validation: "type", expectedType: "string" },
suites: ["smoke"],
metadata: { category: "model", dependency: "llm", estimatedDurationMs: 5000 },
};
export const modelLoadConcurrent: TestDefinition = {
testId: "model-load-concurrent",
params: {
models: [
{ type: "llm", constant: "LLAMA_3_2_1B_INST_Q4_0" },
{ type: "embeddings", constant: "GTE_LARGE_FP16" },
],
},
expectation: { validation: "type", expectedType: "array" },
suites: ["smoke"],
metadata: {
category: "model",
dependency: "none",
estimatedDurationMs: 120000,
expectedCount: 2,
},
};
export const modelReloadLlm: TestDefinition = {
testId: "model-reload-llm",
params: {},
expectation: { validation: "type", expectedType: "string" },
metadata: {
category: "model",
dependency: "llm",
estimatedDurationMs: 15000,
},
};
export const modelSwitchLlm: TestDefinition = {
testId: "model-switch-llm",
params: {},
expectation: { validation: "type", expectedType: "string" },
metadata: {
category: "model",
dependency: "llm",
estimatedDurationMs: 90000,
},
};
export const modelReloadAfterError: TestDefinition = {
testId: "model-reload-after-error",
params: {},
expectation: { validation: "type", expectedType: "string" },
metadata: {
category: "model",
dependency: "llm",
estimatedDurationMs: 70000,
},
};
export const modelLoadInferredType: TestDefinition = {
testId: "model-load-inferred-type",
params: {},
expectation: { validation: "type", expectedType: "string" },
suites: ["smoke"],
metadata: {
category: "model",
dependency: "none",
estimatedDurationMs: 60000,
},
};
export const modelLoadMissingTypeStringSrc: TestDefinition = {
testId: "model-load-missing-type-string-src",
params: { modelPath: "/invalid/path/nonexistent-model.gguf" },
expectation: {
validation: "throws-error",
errorContains: "modelType is required",
},
suites: ["smoke"],
metadata: {
category: "model",
dependency: "none",
estimatedDurationMs: 2000,
},
};
// Export all tests as array
export const tests = [
// Model tests (first section)
modelLoadLlm,
modelLoadEmbedding,
modelLoadOcr,
modelLoadInvalid,
modelUnload,
modelLoadConcurrent,
modelReloadLlm,
// Parakeet transcription tests
...parakeetTests,
...parakeetStreamTests,
// Completion tests
...completionTests,
// Transcription tests
...transcriptionTests,
// BCI (neural-signal) transcription tests
...bciTests,
// transcribeStream VAD + endOfTurn event tests
...transcribeStreamEventsTests,
// Embedding tests
...embeddingTests,
// RAG tests
...ragTests,
// Translation: IndicTrans2 (EN↔HI)
...translationIndicTransTests,
// Translation: Bergamot (EN→FR, EN→ES)
...translationBergamotTests,
// Translation: Bergamot cache reload regression
...translationBergamotCacheTests,
// Translation: LLM (open-vocabulary via from/to)
...translationLlmTests,
// Translation: Salamandra (EU languages)
...translationSalamandraTests,
// Translation: AfriqueGemma (African languages)
...translationAfriquegemmaTests,
// Sharded model tests
...shardedModelTests,
// HTTP embedding tests
...httpEmbeddingTests,
// Model info tests (includes both registry-side and loaded-model introspection)
...modelInfoTests,
// KV cache tests
...kvCacheTests,
// Error tests
...errorTests,
// Tools tests
...toolsTests,
// OCR tests
...ocrTests,
// Classification tests
...classificationTests,
// TTS tests
...ttsTests,
// Config reload tests
...configReloadTests,
// Logging tests
...loggingTests,
// Registry tests
...registryTests,
// Vision tests
...visionTests,
// Download tests (cancel isolation)
...downloadTests,
// Diffusion tests
...diffusionTests,
// Delegated inference tests (P2P)
...delegatedInferenceTests,
// Finetuning tests
...finetuneTests,
// Lifecycle tests (suspend/resume)
...lifecycleTests,
// Registry-download config tests (retries + stream timeout)
...configTests,
// Wrong-model error tests
...wrongModelTests,
// No-lingering-bare regression tests
...noLingeringBareTests,
// Multi-GPU config smoke (verifies split-mode and main-gpu flow through stack)
...multiGpuTests,
// Typed cancel outcomes + KvCacheSession rollback e2e
...cancellationTests,
// VLA (SmolVLA + π₀.₅) — runs on desktop; mobile skips via SkipExecutor
// (see mobile/consumer.ts) because the GGUFs are too large for the
// Device Farm infra (see note there).
...vlaTests,
// Additional model tests
modelSwitchLlm,
modelReloadAfterError,
modelLoadInferredType,
modelLoadMissingTypeStringSrc,
];