@daocloud-proto/infery 0.0.0-dev-fba3ab72 → 0.0.0-dev-8c5b0349
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.
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
/*
|
|
4
|
+
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import * as InferyCommonCommon from "../../../common/common.pb"
|
|
8
|
+
import * as fm from "../../../fetch.pb"
|
|
9
|
+
import * as GoogleProtobufStruct from "../../../google/protobuf/struct.pb"
|
|
10
|
+
import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
|
|
11
|
+
|
|
12
|
+
type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
|
|
13
|
+
type OneOf<T> =
|
|
14
|
+
| { [k in keyof T]?: undefined }
|
|
15
|
+
| (
|
|
16
|
+
keyof T extends infer K ?
|
|
17
|
+
(K extends string & keyof T ? { [k in K]: T[K] } & Absent<T, K>
|
|
18
|
+
: never)
|
|
19
|
+
: never);
|
|
20
|
+
|
|
21
|
+
export enum TestTaskAction {
|
|
22
|
+
TEST_TASK_ACTION_UNSPECIFIED = "TEST_TASK_ACTION_UNSPECIFIED",
|
|
23
|
+
TEST_TASK_ACTION_PAUSE = "TEST_TASK_ACTION_PAUSE",
|
|
24
|
+
TEST_TASK_ACTION_RESUME = "TEST_TASK_ACTION_RESUME",
|
|
25
|
+
TEST_TASK_ACTION_RETRY = "TEST_TASK_ACTION_RETRY",
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export enum InferenceTestType {
|
|
29
|
+
INFERENCE_TEST_TYPE_UNSPECIFIED = "INFERENCE_TEST_TYPE_UNSPECIFIED",
|
|
30
|
+
INFERENCE_TEST_TYPE_FUNCTIONAL = "INFERENCE_TEST_TYPE_FUNCTIONAL",
|
|
31
|
+
INFERENCE_TEST_TYPE_PERFORMANCE = "INFERENCE_TEST_TYPE_PERFORMANCE",
|
|
32
|
+
INFERENCE_TEST_TYPE_ACCURACY = "INFERENCE_TEST_TYPE_ACCURACY",
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export enum RetryPolicy {
|
|
36
|
+
RETRY_POLICY_UNSPECIFIED = "RETRY_POLICY_UNSPECIFIED",
|
|
37
|
+
RETRY_POLICY_ALL = "RETRY_POLICY_ALL",
|
|
38
|
+
RETRY_POLICY_FAIL_ONLY = "RETRY_POLICY_FAIL_ONLY",
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export enum TaskStatus {
|
|
42
|
+
TASK_STATUS_UNSPECIFIED = "TASK_STATUS_UNSPECIFIED",
|
|
43
|
+
TASK_STATUS_PENDING = "TASK_STATUS_PENDING",
|
|
44
|
+
TASK_STATUS_RUNNING = "TASK_STATUS_RUNNING",
|
|
45
|
+
TASK_STATUS_PAUSED = "TASK_STATUS_PAUSED",
|
|
46
|
+
TASK_STATUS_COMPLETED = "TASK_STATUS_COMPLETED",
|
|
47
|
+
TASK_STATUS_FAILED = "TASK_STATUS_FAILED",
|
|
48
|
+
TASK_STATUS_STOPPED = "TASK_STATUS_STOPPED",
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export enum ResultStatus {
|
|
52
|
+
RESULT_STATUS_UNSPECIFIED = "RESULT_STATUS_UNSPECIFIED",
|
|
53
|
+
RESULT_STATUS_PASSED = "RESULT_STATUS_PASSED",
|
|
54
|
+
RESULT_STATUS_FAILED = "RESULT_STATUS_FAILED",
|
|
55
|
+
RESULT_STATUS_WARNING = "RESULT_STATUS_WARNING",
|
|
56
|
+
RESULT_STATUS_ERROR = "RESULT_STATUS_ERROR",
|
|
57
|
+
RESULT_STATUS_SKIPPED = "RESULT_STATUS_SKIPPED",
|
|
58
|
+
RESULT_STATUS_PARTIAL = "RESULT_STATUS_PARTIAL",
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
type BaseModelServingConnection = {
|
|
63
|
+
name?: string
|
|
64
|
+
credentialSecretName?: string
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export type ModelServingConnection = BaseModelServingConnection
|
|
68
|
+
& OneOf<{ modelName: string }>
|
|
69
|
+
& OneOf<{ upstream: string }>
|
|
70
|
+
|
|
71
|
+
export type FunctionalCase = {
|
|
72
|
+
id?: string
|
|
73
|
+
parameters?: GoogleProtobufStruct.Struct
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export type FunctionalTest = {
|
|
77
|
+
cases?: FunctionalCase[]
|
|
78
|
+
retryPolicy?: RetryPolicy
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export type InferenceTestTaskSpec = {
|
|
82
|
+
type?: InferenceTestType
|
|
83
|
+
functional?: FunctionalTest
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export type InferenceTestTask = {
|
|
87
|
+
name?: string
|
|
88
|
+
cluster?: string
|
|
89
|
+
namespace?: string
|
|
90
|
+
modelServing?: ModelServingConnection
|
|
91
|
+
spec?: InferenceTestTaskSpec
|
|
92
|
+
execution?: ExecutionSpec
|
|
93
|
+
status?: InferenceTestTaskStatus
|
|
94
|
+
createTime?: GoogleProtobufTimestamp.Timestamp
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export type CreateInferenceTestTaskRequest = {
|
|
98
|
+
workspace?: number
|
|
99
|
+
cluster?: string
|
|
100
|
+
namespace?: string
|
|
101
|
+
name?: string
|
|
102
|
+
modelServing?: ModelServingConnection
|
|
103
|
+
spec?: InferenceTestTaskSpec
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export type GetInferenceTestTaskRequest = {
|
|
107
|
+
workspace?: number
|
|
108
|
+
cluster?: string
|
|
109
|
+
name?: string
|
|
110
|
+
namespace?: string
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export type DeleteInferenceTestTaskRequest = {
|
|
114
|
+
workspace?: number
|
|
115
|
+
cluster?: string
|
|
116
|
+
name?: string
|
|
117
|
+
namespace?: string
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export type ListInferenceTestTasksRequest = {
|
|
121
|
+
workspace?: number
|
|
122
|
+
cluster?: string
|
|
123
|
+
namespace?: string
|
|
124
|
+
page?: InferyCommonCommon.Pagination
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export type ListInferenceTestTasksResponse = {
|
|
128
|
+
items?: TestTaskSummary[]
|
|
129
|
+
page?: InferyCommonCommon.Pagination
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export type GetFunctionalTestDefinitionRequest = {
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export type FunctionalTestDefinition = {
|
|
136
|
+
groups?: FunctionalCaseGroup[]
|
|
137
|
+
cases?: FunctionalCaseDefinition[]
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export type PerformInferenceTestTaskActionRequest = {
|
|
141
|
+
workspace?: number
|
|
142
|
+
cluster?: string
|
|
143
|
+
name?: string
|
|
144
|
+
action?: TestTaskAction
|
|
145
|
+
retryPolicy?: RetryPolicy
|
|
146
|
+
namespace?: string
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export type FunctionalTestReportSummary = {
|
|
150
|
+
attempt?: string
|
|
151
|
+
verdict?: ResultStatus
|
|
152
|
+
summary?: FunctionalTestSummary
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export type TestTaskSummary = {
|
|
156
|
+
name?: string
|
|
157
|
+
cluster?: string
|
|
158
|
+
namespace?: string
|
|
159
|
+
type?: InferenceTestType
|
|
160
|
+
modelServing?: string
|
|
161
|
+
phase?: TaskStatus
|
|
162
|
+
functional?: FunctionalTestReportSummary
|
|
163
|
+
createTime?: GoogleProtobufTimestamp.Timestamp
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export type ExecutionSpec = {
|
|
167
|
+
requestedAttempt?: string
|
|
168
|
+
paused?: boolean
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
type BaseCheckResult = {
|
|
173
|
+
id?: string
|
|
174
|
+
status?: ResultStatus
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export type CheckResult = BaseCheckResult
|
|
178
|
+
& OneOf<{ reason: string }>
|
|
179
|
+
& OneOf<{ message: string }>
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
type BaseHealthCheckResult = {
|
|
183
|
+
attempt?: string
|
|
184
|
+
status?: ResultStatus
|
|
185
|
+
checks?: CheckResult[]
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
export type HealthCheckResult = BaseHealthCheckResult
|
|
189
|
+
& OneOf<{ reason: string }>
|
|
190
|
+
& OneOf<{ message: string }>
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
type BaseFunctionalCaseResult = {
|
|
194
|
+
id?: string
|
|
195
|
+
attempt?: string
|
|
196
|
+
status?: ResultStatus
|
|
197
|
+
checks?: CheckResult[]
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
export type FunctionalCaseResult = BaseFunctionalCaseResult
|
|
201
|
+
& OneOf<{ reason: string }>
|
|
202
|
+
& OneOf<{ message: string }>
|
|
203
|
+
|
|
204
|
+
export type FunctionalTestSummary = {
|
|
205
|
+
selected?: number
|
|
206
|
+
passed?: number
|
|
207
|
+
failed?: number
|
|
208
|
+
warning?: number
|
|
209
|
+
skipped?: number
|
|
210
|
+
partial?: number
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export type FunctionalTestReport = {
|
|
214
|
+
attempt?: string
|
|
215
|
+
verdict?: ResultStatus
|
|
216
|
+
summary?: FunctionalTestSummary
|
|
217
|
+
cases?: FunctionalCaseResult[]
|
|
218
|
+
generatedAt?: GoogleProtobufTimestamp.Timestamp
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
type BaseExecutionProgress = {
|
|
223
|
+
unit?: string
|
|
224
|
+
completed?: number
|
|
225
|
+
currentItemId?: string
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
export type ExecutionProgress = BaseExecutionProgress
|
|
229
|
+
& OneOf<{ total: number }>
|
|
230
|
+
|
|
231
|
+
export type ExecutionStatus = {
|
|
232
|
+
id?: string
|
|
233
|
+
state?: TaskStatus
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export type InferenceTestTaskStatus = {
|
|
237
|
+
phase?: TaskStatus
|
|
238
|
+
startedAt?: GoogleProtobufTimestamp.Timestamp
|
|
239
|
+
completedAt?: GoogleProtobufTimestamp.Timestamp
|
|
240
|
+
reason?: string
|
|
241
|
+
message?: string
|
|
242
|
+
progress?: ExecutionProgress
|
|
243
|
+
functional?: FunctionalTestStatus
|
|
244
|
+
activeExecution?: ExecutionStatus
|
|
245
|
+
healthCheck?: HealthCheckResult
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
export type FunctionalCaseProgress = {
|
|
249
|
+
id?: string
|
|
250
|
+
executionStatus?: TaskStatus
|
|
251
|
+
result?: FunctionalCaseResult
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
export type FunctionalTestStatus = {
|
|
255
|
+
cases?: FunctionalCaseProgress[]
|
|
256
|
+
report?: FunctionalTestReport
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
export type FunctionalCaseGroup = {
|
|
260
|
+
group?: string
|
|
261
|
+
name?: InferyCommonCommon.I18nName
|
|
262
|
+
summary?: InferyCommonCommon.I18nName
|
|
263
|
+
description?: InferyCommonCommon.I18nName
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
export type FunctionalCaseDefinition = {
|
|
267
|
+
caseId?: string
|
|
268
|
+
group?: string
|
|
269
|
+
name?: InferyCommonCommon.I18nName
|
|
270
|
+
summary?: InferyCommonCommon.I18nName
|
|
271
|
+
description?: InferyCommonCommon.I18nName
|
|
272
|
+
parameterSchema?: GoogleProtobufStruct.Struct
|
|
273
|
+
enabled?: boolean
|
|
274
|
+
defaultSelected?: boolean
|
|
275
|
+
required?: boolean
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
export class InferenceTestManagement {
|
|
279
|
+
static CreateInferenceTestTask(req: CreateInferenceTestTaskRequest, initReq?: fm.InitReq): Promise<InferenceTestTask> {
|
|
280
|
+
return fm.fetchReq<CreateInferenceTestTaskRequest, InferenceTestTask>(`/apis/infery.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/test-tasks`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
281
|
+
}
|
|
282
|
+
static ListInferenceTestTasks(req: ListInferenceTestTasksRequest, initReq?: fm.InitReq): Promise<ListInferenceTestTasksResponse> {
|
|
283
|
+
return fm.fetchReq<ListInferenceTestTasksRequest, ListInferenceTestTasksResponse>(`/apis/infery.io/v1alpha1/workspaces/${req["workspace"]}/test-tasks?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
284
|
+
}
|
|
285
|
+
static GetInferenceTestTask(req: GetInferenceTestTaskRequest, initReq?: fm.InitReq): Promise<InferenceTestTask> {
|
|
286
|
+
return fm.fetchReq<GetInferenceTestTaskRequest, InferenceTestTask>(`/apis/infery.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/test-tasks/${req["name"]}?${fm.renderURLSearchParams(req, ["workspace", "cluster", "name"])}`, {...initReq, method: "GET"})
|
|
287
|
+
}
|
|
288
|
+
static DeleteInferenceTestTask(req: DeleteInferenceTestTaskRequest, initReq?: fm.InitReq): Promise<InferenceTestTask> {
|
|
289
|
+
return fm.fetchReq<DeleteInferenceTestTaskRequest, InferenceTestTask>(`/apis/infery.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/test-tasks/${req["name"]}?${fm.renderURLSearchParams(req, ["workspace", "cluster", "name"])}`, {...initReq, method: "DELETE"})
|
|
290
|
+
}
|
|
291
|
+
static UpdateInferenceTestTask(req: CreateInferenceTestTaskRequest, initReq?: fm.InitReq): Promise<InferenceTestTask> {
|
|
292
|
+
return fm.fetchReq<CreateInferenceTestTaskRequest, InferenceTestTask>(`/apis/infery.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/test-tasks/${req["name"]}`, {...initReq, method: "PATCH", body: JSON.stringify(req, fm.replacer)})
|
|
293
|
+
}
|
|
294
|
+
static PerformInferenceTestTaskAction(req: PerformInferenceTestTaskActionRequest, initReq?: fm.InitReq): Promise<InferenceTestTask> {
|
|
295
|
+
return fm.fetchReq<PerformInferenceTestTaskActionRequest, InferenceTestTask>(`/apis/infery.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/test-tasks/${req["name"]}/actions`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
296
|
+
}
|
|
297
|
+
static GetFunctionalTestDefinition(req: GetFunctionalTestDefinitionRequest, initReq?: fm.InitReq): Promise<FunctionalTestDefinition> {
|
|
298
|
+
return fm.fetchReq<GetFunctionalTestDefinitionRequest, FunctionalTestDefinition>(`/apis/infery.io/v1alpha1/functional-test-definition?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
299
|
+
}
|
|
300
|
+
}
|
|
@@ -170,6 +170,7 @@ type BasePreviewModelServingRequest = {
|
|
|
170
170
|
export type PreviewModelServingRequest = BasePreviewModelServingRequest
|
|
171
171
|
& OneOf<{ form: string; helmValues: string }>
|
|
172
172
|
& OneOf<{ formVersion: string }>
|
|
173
|
+
& OneOf<{ resourceVersion: string }>
|
|
173
174
|
|
|
174
175
|
export type PreviewModelServingResponse = {
|
|
175
176
|
helmValues?: string
|
|
@@ -366,6 +367,7 @@ type BaseUpdateModelServingRequest = {
|
|
|
366
367
|
alias?: string
|
|
367
368
|
resourceVersion?: string
|
|
368
369
|
modelConfiguration?: ModelConfiguration
|
|
370
|
+
origin?: ModelServingOrigin
|
|
369
371
|
}
|
|
370
372
|
|
|
371
373
|
export type UpdateModelServingRequest = BaseUpdateModelServingRequest
|
|
@@ -380,13 +382,11 @@ export type DeleteModelServingRequest = {
|
|
|
380
382
|
export type SyncModelServingRequest = {
|
|
381
383
|
workspace?: number
|
|
382
384
|
name?: string
|
|
383
|
-
resourceVersion?: string
|
|
384
385
|
}
|
|
385
386
|
|
|
386
387
|
export type TerminateModelServingOperationRequest = {
|
|
387
388
|
workspace?: number
|
|
388
389
|
name?: string
|
|
389
|
-
resourceVersion?: string
|
|
390
390
|
}
|
|
391
391
|
|
|
392
392
|
export type UpdateModelServingResponse = {
|
|
@@ -411,10 +411,6 @@ export type SyncModelServingResponse = {
|
|
|
411
411
|
}
|
|
412
412
|
|
|
413
413
|
export type TerminateModelServingOperationResponse = {
|
|
414
|
-
name?: string
|
|
415
|
-
phase?: OperationPhase
|
|
416
|
-
resourceVersion?: string
|
|
417
|
-
updateTime?: GoogleProtobufTimestamp.Timestamp
|
|
418
414
|
}
|
|
419
415
|
|
|
420
416
|
export type CreateModelServingJSONRequest = {
|
|
@@ -484,11 +480,19 @@ export type ModelServingFormInstance = {
|
|
|
484
480
|
origin?: ModelServingOrigin
|
|
485
481
|
}
|
|
486
482
|
|
|
483
|
+
export type ModelServingFormParseIssue = {
|
|
484
|
+
path?: string
|
|
485
|
+
message?: string
|
|
486
|
+
blocking?: boolean
|
|
487
|
+
}
|
|
488
|
+
|
|
487
489
|
export type GetModelServingFormResponse = {
|
|
488
490
|
form?: string
|
|
489
491
|
stack?: InferyCommonCommon.InferenceStack
|
|
490
492
|
disaggregationMode?: InferyCommonCommon.DisaggregationMode
|
|
491
493
|
version?: string
|
|
494
|
+
parseIssues?: ModelServingFormParseIssue[]
|
|
495
|
+
canContinueEditing?: boolean
|
|
492
496
|
}
|
|
493
497
|
|
|
494
498
|
export class ModelServingManagement {
|
|
@@ -529,7 +533,7 @@ export class ModelServingManagement {
|
|
|
529
533
|
return fm.fetchReq<SyncModelServingRequest, SyncModelServingResponse>(`/apis/infery.io/v1alpha1/workspaces/${req["workspace"]}/model-serving/${req["name"]}/sync`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
530
534
|
}
|
|
531
535
|
static TerminateModelServingOperation(req: TerminateModelServingOperationRequest, initReq?: fm.InitReq): Promise<TerminateModelServingOperationResponse> {
|
|
532
|
-
return fm.fetchReq<TerminateModelServingOperationRequest, TerminateModelServingOperationResponse>(`/apis/infery.io/v1alpha1/workspaces/${req["workspace"]}/model-serving/${req["name"]}/operation
|
|
536
|
+
return fm.fetchReq<TerminateModelServingOperationRequest, TerminateModelServingOperationResponse>(`/apis/infery.io/v1alpha1/workspaces/${req["workspace"]}/model-serving/${req["name"]}/operation`, {...initReq, method: "DELETE"})
|
|
533
537
|
}
|
|
534
538
|
static CreateModelServingJSON(req: CreateModelServingJSONRequest, initReq?: fm.InitReq): Promise<CreateModelServingResponse> {
|
|
535
539
|
return fm.fetchReq<CreateModelServingJSONRequest, CreateModelServingResponse>(`/apis/infery.io/v1alpha1/workspaces/${req["workspace"]}/model-serving:json`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|