@daocloud-proto/infery 0.0.0-dev-fba3ab72 → 0.0.0-dev-2ab90a29
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
|
+
}
|
|
@@ -380,13 +380,11 @@ export type DeleteModelServingRequest = {
|
|
|
380
380
|
export type SyncModelServingRequest = {
|
|
381
381
|
workspace?: number
|
|
382
382
|
name?: string
|
|
383
|
-
resourceVersion?: string
|
|
384
383
|
}
|
|
385
384
|
|
|
386
385
|
export type TerminateModelServingOperationRequest = {
|
|
387
386
|
workspace?: number
|
|
388
387
|
name?: string
|
|
389
|
-
resourceVersion?: string
|
|
390
388
|
}
|
|
391
389
|
|
|
392
390
|
export type UpdateModelServingResponse = {
|
|
@@ -411,10 +409,6 @@ export type SyncModelServingResponse = {
|
|
|
411
409
|
}
|
|
412
410
|
|
|
413
411
|
export type TerminateModelServingOperationResponse = {
|
|
414
|
-
name?: string
|
|
415
|
-
phase?: OperationPhase
|
|
416
|
-
resourceVersion?: string
|
|
417
|
-
updateTime?: GoogleProtobufTimestamp.Timestamp
|
|
418
412
|
}
|
|
419
413
|
|
|
420
414
|
export type CreateModelServingJSONRequest = {
|
|
@@ -529,7 +523,7 @@ export class ModelServingManagement {
|
|
|
529
523
|
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
524
|
}
|
|
531
525
|
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
|
|
526
|
+
return fm.fetchReq<TerminateModelServingOperationRequest, TerminateModelServingOperationResponse>(`/apis/infery.io/v1alpha1/workspaces/${req["workspace"]}/model-serving/${req["name"]}/operation`, {...initReq, method: "DELETE"})
|
|
533
527
|
}
|
|
534
528
|
static CreateModelServingJSON(req: CreateModelServingJSONRequest, initReq?: fm.InitReq): Promise<CreateModelServingResponse> {
|
|
535
529
|
return fm.fetchReq<CreateModelServingJSONRequest, CreateModelServingResponse>(`/apis/infery.io/v1alpha1/workspaces/${req["workspace"]}/model-serving:json`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|