@daocloud-proto/infery 0.0.0-dev-80114340 → 0.0.0-dev-04c6ed03
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/fetch.pb.ts
CHANGED
|
@@ -338,21 +338,4 @@ export function renderURLSearchParams<T extends RequestPayload>(
|
|
|
338
338
|
);
|
|
339
339
|
|
|
340
340
|
return new URLSearchParams(urlSearchParams).toString();
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
export async function fetchRawReq(path: string, init?: InitReq): Promise<Response> {
|
|
344
|
-
const {pathPrefix, ...req} = init || {}
|
|
345
|
-
const url = pathPrefix ? `${pathPrefix}${path}` : path
|
|
346
|
-
const response = await fetch(url, req)
|
|
347
|
-
if (!response.ok) {
|
|
348
|
-
const text = await response.text()
|
|
349
|
-
let body: unknown = text
|
|
350
|
-
try {
|
|
351
|
-
body = JSON.parse(text)
|
|
352
|
-
} catch {
|
|
353
|
-
// Preserve a non-JSON error body when an intermediary does not use the gateway error schema.
|
|
354
|
-
}
|
|
355
|
-
throw body
|
|
356
|
-
}
|
|
357
|
-
return response
|
|
358
|
-
}
|
|
341
|
+
}
|
|
@@ -89,17 +89,6 @@ export type InferenceTemplate = {
|
|
|
89
89
|
spec?: InferenceTemplateSpec
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
|
|
93
|
-
type BaseExportInferenceTemplateRequest = {
|
|
94
|
-
workspace?: number
|
|
95
|
-
modelServingName?: string
|
|
96
|
-
templateName?: string
|
|
97
|
-
maturity?: Maturity
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
export type ExportInferenceTemplateRequest = BaseExportInferenceTemplateRequest
|
|
101
|
-
& OneOf<{ resourceVersion: string }>
|
|
102
|
-
|
|
103
92
|
export type ParseInferenceTemplateRequest = {
|
|
104
93
|
workspace?: number
|
|
105
94
|
manifest?: InferenceTemplateManifest
|
|
@@ -165,9 +154,6 @@ export type DeleteInferenceTemplateRequest = {
|
|
|
165
154
|
}
|
|
166
155
|
|
|
167
156
|
export class InferenceTemplateManagement {
|
|
168
|
-
static ExportInferenceTemplate(req: ExportInferenceTemplateRequest, initReq?: fm.InitReq): Promise<Response> {
|
|
169
|
-
return fm.fetchRawReq(`/apis/infery.io/v1alpha1/workspaces/${req["workspace"]}/inference-templates:export?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
170
|
-
}
|
|
171
157
|
static ParseInferenceTemplate(req: ParseInferenceTemplateRequest, initReq?: fm.InitReq): Promise<ParseInferenceTemplateResponse> {
|
|
172
158
|
return fm.fetchReq<ParseInferenceTemplateRequest, ParseInferenceTemplateResponse>(`/apis/infery.io/v1alpha1/workspaces/${req["workspace"]}/inference-templates:parse`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
173
159
|
}
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
import * as InferyCommonCommon from "../../../common/common.pb"
|
|
8
8
|
import * as fm from "../../../fetch.pb"
|
|
9
9
|
import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
|
|
10
|
+
import * as InferyManagement_apiInference_templateV1alpha1Inference_template from "../../inference_template/v1alpha1/inference_template.pb"
|
|
10
11
|
|
|
11
12
|
type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
|
|
12
13
|
type OneOf<T> =
|
|
@@ -425,6 +426,19 @@ export type CreateModelServingJSONRequest = {
|
|
|
425
426
|
helmValues?: string
|
|
426
427
|
}
|
|
427
428
|
|
|
429
|
+
|
|
430
|
+
type BaseExportInferenceTemplateRequest = {
|
|
431
|
+
workspace?: number
|
|
432
|
+
modelServingName?: string
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
export type ExportInferenceTemplateRequest = BaseExportInferenceTemplateRequest
|
|
436
|
+
& OneOf<{ version: string }>
|
|
437
|
+
|
|
438
|
+
export type ExportInferenceTemplateResponse = {
|
|
439
|
+
manifest?: InferyManagement_apiInference_templateV1alpha1Inference_template.InferenceTemplateManifest
|
|
440
|
+
}
|
|
441
|
+
|
|
428
442
|
export type GetModelServingJSONRequest = {
|
|
429
443
|
workspace?: number
|
|
430
444
|
name?: string
|
|
@@ -532,4 +546,7 @@ export class ModelServingManagement {
|
|
|
532
546
|
static UpdateModelServingJSON(req: UpdateModelServingJSONRequest, initReq?: fm.InitReq): Promise<UpdateModelServingJSONResponse> {
|
|
533
547
|
return fm.fetchReq<UpdateModelServingJSONRequest, UpdateModelServingJSONResponse>(`/apis/infery.io/v1alpha1/workspaces/${req["workspace"]}/model-serving/${req["name"]}/json`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
534
548
|
}
|
|
549
|
+
static ExportInferenceTemplate(req: ExportInferenceTemplateRequest, initReq?: fm.InitReq): Promise<ExportInferenceTemplateResponse> {
|
|
550
|
+
return fm.fetchReq<ExportInferenceTemplateRequest, ExportInferenceTemplateResponse>(`/apis/infery.io/v1alpha1/workspaces/${req["workspace"]}/model-serving/${req["modelServingName"]}:export?${fm.renderURLSearchParams(req, ["workspace", "modelServingName"])}`, {...initReq, method: "GET"})
|
|
551
|
+
}
|
|
535
552
|
}
|
|
@@ -68,24 +68,41 @@ export type ListClusterGPUTypesRequest = {
|
|
|
68
68
|
export type GPUType = {
|
|
69
69
|
type?: string
|
|
70
70
|
alias?: string
|
|
71
|
+
resource?: GPUResourceSetting[]
|
|
72
|
+
resourceTemplate?: GPUResourceSetting
|
|
73
|
+
isDynamic?: boolean
|
|
74
|
+
provider?: string
|
|
75
|
+
productKey?: string
|
|
76
|
+
products?: string[]
|
|
77
|
+
vendor?: string
|
|
71
78
|
}
|
|
72
79
|
|
|
73
|
-
export type
|
|
74
|
-
|
|
80
|
+
export type GPUResourceSetting = {
|
|
81
|
+
key?: string
|
|
82
|
+
alias?: string
|
|
83
|
+
isAllocatable?: boolean
|
|
84
|
+
description?: string
|
|
85
|
+
aliasZh?: string
|
|
86
|
+
range?: ResourceRange
|
|
87
|
+
available?: AvailableResource
|
|
88
|
+
type?: string
|
|
89
|
+
descriptionZh?: string
|
|
75
90
|
}
|
|
76
91
|
|
|
77
|
-
export type
|
|
78
|
-
|
|
79
|
-
|
|
92
|
+
export type AvailableResource = {
|
|
93
|
+
available?: string
|
|
94
|
+
errorMessage?: string
|
|
80
95
|
}
|
|
81
96
|
|
|
82
|
-
export type
|
|
83
|
-
|
|
84
|
-
|
|
97
|
+
export type ResourceRange = {
|
|
98
|
+
min?: number
|
|
99
|
+
minDesc?: string
|
|
100
|
+
max?: number
|
|
101
|
+
maxDesc?: string
|
|
85
102
|
}
|
|
86
103
|
|
|
87
|
-
export type
|
|
88
|
-
items?:
|
|
104
|
+
export type ListClusterGPUTypesResponse = {
|
|
105
|
+
items?: GPUType[]
|
|
89
106
|
}
|
|
90
107
|
|
|
91
108
|
export type ListClusterRDMANetworksRequest = {
|
|
@@ -182,9 +199,6 @@ export type ListConfigMapsResponse = {
|
|
|
182
199
|
}
|
|
183
200
|
|
|
184
201
|
export class WorkspaceService {
|
|
185
|
-
static ListClusterGPUVendors(req: ListClusterGPUVendorsRequest, initReq?: fm.InitReq): Promise<ListClusterGPUVendorsResponse> {
|
|
186
|
-
return fm.fetchReq<ListClusterGPUVendorsRequest, ListClusterGPUVendorsResponse>(`/apis/infery.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/gpu-vendors?${fm.renderURLSearchParams(req, ["workspace", "cluster"])}`, {...initReq, method: "GET"})
|
|
187
|
-
}
|
|
188
202
|
static ListClusterRDMANetworks(req: ListClusterRDMANetworksRequest, initReq?: fm.InitReq): Promise<ListClusterRDMANetworksResponse> {
|
|
189
203
|
return fm.fetchReq<ListClusterRDMANetworksRequest, ListClusterRDMANetworksResponse>(`/apis/infery.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/rdma-networks?${fm.renderURLSearchParams(req, ["workspace", "cluster"])}`, {...initReq, method: "GET"})
|
|
190
204
|
}
|