Skip to content

Commit 849c487

Browse files
ritazhsozercan
andauthored
fix(kaito): deploy models that require GPU vs CPU (kaito-project#262)
Signed-off-by: Rita Zhang <1856066+ritazh@users.noreply.github.com> Co-authored-by: Sertac Ozercan <sozercan@gmail.com>
1 parent 1f5327a commit 849c487

6 files changed

Lines changed: 1425 additions & 13 deletions

File tree

backend/src/routes/deployments.test.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ describe('Deployment Routes', () => {
183183
});
184184
});
185185

186-
test('omits GPU resources for KAITO CPU preview manifests', async () => {
186+
test('emits explicit zero GPU resources for KAITO CPU preview manifests', async () => {
187187
restores.push(
188188
mockServiceMethod(configService, 'getDefaultNamespace', async () => 'kaito-workspace'),
189189
);
@@ -208,7 +208,12 @@ describe('Deployment Routes', () => {
208208
expect(res.status).toBe(200);
209209

210210
const data = await res.json();
211-
expect(data.resources[0].manifest.spec.resources).toBeUndefined();
211+
expect(data.resources[0].manifest.spec.resources).toEqual({
212+
gpu: {
213+
count: 0,
214+
type: 'nvidia.com/gpu',
215+
},
216+
});
212217
expect(data.resources[0].manifest.spec.engine.type).toBe('llamacpp');
213218
});
214219

0 commit comments

Comments
 (0)