Skip to content

Commit ddb2957

Browse files
feat(inference): add modelId and quantization to updateDeploymentRequest (#1925)
Co-authored-by: Jonathan R. <jremy@scaleway.com>
1 parent 7880c83 commit ddb2957

File tree

4 files changed

+25
-16
lines changed

4 files changed

+25
-16
lines changed

packages/clients/src/api/block/v1alpha1/marshalling.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import type {
3030
VolumeType,
3131
} from './types.gen'
3232

33-
export const unmarshalReference = (data: unknown): Reference => {
33+
const unmarshalReference = (data: unknown): Reference => {
3434
if (!isJSONObject(data)) {
3535
throw new TypeError(
3636
`Unmarshalling the type 'Reference' failed as data isn't a dictionary.`,

packages/clients/src/api/inference/v1/marshalling.gen.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,12 @@ export const marshalUpdateDeploymentRequest = (
358358
): Record<string, unknown> => ({
359359
max_size: request.maxSize,
360360
min_size: request.minSize,
361+
model_id: request.modelId,
361362
name: request.name,
363+
quantization:
364+
request.quantization !== undefined
365+
? marshalDeploymentQuantization(request.quantization, defaults)
366+
: undefined,
362367
tags: request.tags,
363368
})
364369

packages/clients/src/api/inference/v1/types.gen.ts

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ export interface NodeType {
228228
region: ScwRegion
229229
}
230230

231-
export interface CreateDeploymentRequest {
231+
export type CreateDeploymentRequest = {
232232
/**
233233
* Region to target. If none is passed will use default region from the
234234
* config.
@@ -259,7 +259,7 @@ export interface CreateDeploymentRequest {
259259
quantization?: DeploymentQuantization
260260
}
261261

262-
export interface CreateEndpointRequest {
262+
export type CreateEndpointRequest = {
263263
/**
264264
* Region to target. If none is passed will use default region from the
265265
* config.
@@ -271,7 +271,7 @@ export interface CreateEndpointRequest {
271271
endpoint: EndpointSpec
272272
}
273273

274-
export interface CreateModelRequest {
274+
export type CreateModelRequest = {
275275
/**
276276
* Region to target. If none is passed will use default region from the
277277
* config.
@@ -285,7 +285,7 @@ export interface CreateModelRequest {
285285
source: ModelSource
286286
}
287287

288-
export interface DeleteDeploymentRequest {
288+
export type DeleteDeploymentRequest = {
289289
/**
290290
* Region to target. If none is passed will use default region from the
291291
* config.
@@ -295,7 +295,7 @@ export interface DeleteDeploymentRequest {
295295
deploymentId: string
296296
}
297297

298-
export interface DeleteEndpointRequest {
298+
export type DeleteEndpointRequest = {
299299
/**
300300
* Region to target. If none is passed will use default region from the
301301
* config.
@@ -305,7 +305,7 @@ export interface DeleteEndpointRequest {
305305
endpointId: string
306306
}
307307

308-
export interface DeleteModelRequest {
308+
export type DeleteModelRequest = {
309309
/**
310310
* Region to target. If none is passed will use default region from the
311311
* config.
@@ -315,7 +315,7 @@ export interface DeleteModelRequest {
315315
modelId: string
316316
}
317317

318-
export interface GetDeploymentCertificateRequest {
318+
export type GetDeploymentCertificateRequest = {
319319
/**
320320
* Region to target. If none is passed will use default region from the
321321
* config.
@@ -324,7 +324,7 @@ export interface GetDeploymentCertificateRequest {
324324
deploymentId: string
325325
}
326326

327-
export interface GetDeploymentRequest {
327+
export type GetDeploymentRequest = {
328328
/**
329329
* Region to target. If none is passed will use default region from the
330330
* config.
@@ -334,7 +334,7 @@ export interface GetDeploymentRequest {
334334
deploymentId: string
335335
}
336336

337-
export interface GetModelRequest {
337+
export type GetModelRequest = {
338338
/**
339339
* Region to target. If none is passed will use default region from the
340340
* config.
@@ -344,7 +344,7 @@ export interface GetModelRequest {
344344
modelId: string
345345
}
346346

347-
export interface ListDeploymentsRequest {
347+
export type ListDeploymentsRequest = {
348348
/**
349349
* Region to target. If none is passed will use default region from the
350350
* config.
@@ -373,7 +373,7 @@ export interface ListDeploymentsResponse {
373373
totalCount: number
374374
}
375375

376-
export interface ListModelsRequest {
376+
export type ListModelsRequest = {
377377
/**
378378
* Region to target. If none is passed will use default region from the
379379
* config.
@@ -400,7 +400,7 @@ export interface ListModelsResponse {
400400
totalCount: number
401401
}
402402

403-
export interface ListNodeTypesRequest {
403+
export type ListNodeTypesRequest = {
404404
/**
405405
* Region to target. If none is passed will use default region from the
406406
* config.
@@ -421,7 +421,7 @@ export interface ListNodeTypesResponse {
421421
totalCount: number
422422
}
423423

424-
export interface UpdateDeploymentRequest {
424+
export type UpdateDeploymentRequest = {
425425
/**
426426
* Region to target. If none is passed will use default region from the
427427
* config.
@@ -437,9 +437,13 @@ export interface UpdateDeploymentRequest {
437437
minSize?: number
438438
/** Defines the new maximum size of the pool. */
439439
maxSize?: number
440+
/** Id of the model to set to the deployment. */
441+
modelId?: string
442+
/** Quantization to use to the deployment. */
443+
quantization?: DeploymentQuantization
440444
}
441445

442-
export interface UpdateEndpointRequest {
446+
export type UpdateEndpointRequest = {
443447
/**
444448
* Region to target. If none is passed will use default region from the
445449
* config.

packages/clients/src/api/lb/v1/types.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ export interface RouteMatch {
595595
*/
596596
sni?: string
597597
/**
598-
* Value to match in the HTTP Host request header from an incoming connection.
598+
* Value to match in the HTTP Host request header from an incoming request.
599599
* This field should be set for routes on HTTP Load Balancers.
600600
*
601601
* One-of ('matchType'): at most one of 'sni', 'hostHeader' could be set.

0 commit comments

Comments
 (0)