@daocloud-proto/infery 0.0.0-stage → 0.1.0-rc2
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/common/common.pb.ts +116 -0
- package/common/error.pb.ts +10 -0
- package/common/errorcode.ts +23 -0
- package/fetch.pb.ts +341 -0
- package/management-api/inference_template/v1alpha1/inference_template.pb.ts +181 -0
- package/management-api/inference_test/v1alpha1/inference_test.pb.ts +299 -0
- package/management-api/model_serving/v1alpha1/model_serving.pb.ts +608 -0
- package/management-api/workspace/v1alpha1/workspace.pb.ts +250 -0
- package/package.json +4 -4
- package/README.md +0 -3
|
@@ -0,0 +1,299 @@
|
|
|
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_START = "TEST_TASK_ACTION_START",
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export enum InferenceTestType {
|
|
28
|
+
INFERENCE_TEST_TYPE_UNSPECIFIED = "INFERENCE_TEST_TYPE_UNSPECIFIED",
|
|
29
|
+
INFERENCE_TEST_TYPE_FUNCTIONAL = "INFERENCE_TEST_TYPE_FUNCTIONAL",
|
|
30
|
+
INFERENCE_TEST_TYPE_PERFORMANCE = "INFERENCE_TEST_TYPE_PERFORMANCE",
|
|
31
|
+
INFERENCE_TEST_TYPE_ACCURACY = "INFERENCE_TEST_TYPE_ACCURACY",
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export enum RetryPolicy {
|
|
35
|
+
RETRY_POLICY_UNSPECIFIED = "RETRY_POLICY_UNSPECIFIED",
|
|
36
|
+
RETRY_POLICY_ALL = "RETRY_POLICY_ALL",
|
|
37
|
+
RETRY_POLICY_FAIL_ONLY = "RETRY_POLICY_FAIL_ONLY",
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export enum TaskStatus {
|
|
41
|
+
TASK_STATUS_UNSPECIFIED = "TASK_STATUS_UNSPECIFIED",
|
|
42
|
+
TASK_STATUS_RUNNING = "TASK_STATUS_RUNNING",
|
|
43
|
+
TASK_STATUS_PAUSED = "TASK_STATUS_PAUSED",
|
|
44
|
+
TASK_STATUS_COMPLETED = "TASK_STATUS_COMPLETED",
|
|
45
|
+
TASK_STATUS_FAILED = "TASK_STATUS_FAILED",
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export enum ResultStatus {
|
|
49
|
+
RESULT_STATUS_UNSPECIFIED = "RESULT_STATUS_UNSPECIFIED",
|
|
50
|
+
RESULT_STATUS_PASSED = "RESULT_STATUS_PASSED",
|
|
51
|
+
RESULT_STATUS_FAILED = "RESULT_STATUS_FAILED",
|
|
52
|
+
RESULT_STATUS_SKIPPED = "RESULT_STATUS_SKIPPED",
|
|
53
|
+
RESULT_STATUS_PARTIAL = "RESULT_STATUS_PARTIAL",
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
type BaseModelServingConnection = {
|
|
58
|
+
name?: string
|
|
59
|
+
credentialSecretName?: string
|
|
60
|
+
updateTime?: GoogleProtobufTimestamp.Timestamp
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export type ModelServingConnection = BaseModelServingConnection
|
|
64
|
+
& OneOf<{ modelName: string }>
|
|
65
|
+
& OneOf<{ upstream: string }>
|
|
66
|
+
|
|
67
|
+
export type FunctionalCase = {
|
|
68
|
+
id?: string
|
|
69
|
+
parameters?: InferyCommonCommon.FormState
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export type FunctionalTest = {
|
|
73
|
+
cases?: FunctionalCase[]
|
|
74
|
+
retryPolicy?: RetryPolicy
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export type InferenceTestTaskSpec = {
|
|
78
|
+
type?: InferenceTestType
|
|
79
|
+
functional?: FunctionalTest
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export type InferenceTestTask = {
|
|
83
|
+
name?: string
|
|
84
|
+
cluster?: string
|
|
85
|
+
namespace?: string
|
|
86
|
+
modelServing?: ModelServingConnection
|
|
87
|
+
spec?: InferenceTestTaskSpec
|
|
88
|
+
execution?: ExecutionSpec
|
|
89
|
+
status?: InferenceTestTaskStatus
|
|
90
|
+
createTime?: GoogleProtobufTimestamp.Timestamp
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export type CreateInferenceTestTaskRequest = {
|
|
94
|
+
workspace?: number
|
|
95
|
+
cluster?: string
|
|
96
|
+
namespace?: string
|
|
97
|
+
name?: string
|
|
98
|
+
modelServing?: ModelServingConnection
|
|
99
|
+
spec?: InferenceTestTaskSpec
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export type GetInferenceTestTaskRequest = {
|
|
103
|
+
workspace?: number
|
|
104
|
+
cluster?: string
|
|
105
|
+
name?: string
|
|
106
|
+
namespace?: string
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export type DeleteInferenceTestTaskRequest = {
|
|
110
|
+
workspace?: number
|
|
111
|
+
cluster?: string
|
|
112
|
+
name?: string
|
|
113
|
+
namespace?: string
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
type BaseListInferenceTestTasksRequest = {
|
|
118
|
+
workspace?: number
|
|
119
|
+
cluster?: string
|
|
120
|
+
namespace?: string
|
|
121
|
+
page?: InferyCommonCommon.Pagination
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export type ListInferenceTestTasksRequest = BaseListInferenceTestTasksRequest
|
|
125
|
+
& OneOf<{ type: InferenceTestType }>
|
|
126
|
+
& OneOf<{ phase: TaskStatus }>
|
|
127
|
+
|
|
128
|
+
export type ListInferenceTestTasksResponse = {
|
|
129
|
+
items?: TestTaskSummary[]
|
|
130
|
+
page?: InferyCommonCommon.Pagination
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export type GetFunctionalTestDefinitionRequest = {
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export type FunctionalTestDefinition = {
|
|
137
|
+
groups?: FunctionalCaseGroup[]
|
|
138
|
+
cases?: FunctionalCaseDefinition[]
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export type PerformInferenceTestTaskActionRequest = {
|
|
142
|
+
workspace?: number
|
|
143
|
+
cluster?: string
|
|
144
|
+
name?: string
|
|
145
|
+
action?: TestTaskAction
|
|
146
|
+
namespace?: string
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export type FunctionalTestReportSummary = {
|
|
150
|
+
result?: ResultStatus
|
|
151
|
+
summary?: FunctionalTestSummary
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export type TestTaskSummary = {
|
|
155
|
+
name?: string
|
|
156
|
+
cluster?: string
|
|
157
|
+
namespace?: string
|
|
158
|
+
type?: InferenceTestType
|
|
159
|
+
modelServing?: string
|
|
160
|
+
phase?: TaskStatus
|
|
161
|
+
functional?: FunctionalTestReportSummary
|
|
162
|
+
createTime?: GoogleProtobufTimestamp.Timestamp
|
|
163
|
+
result?: ResultStatus
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export type ExecutionSpec = {
|
|
167
|
+
paused?: boolean
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
type BaseCheckResult = {
|
|
172
|
+
id?: string
|
|
173
|
+
status?: ResultStatus
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export type CheckResult = BaseCheckResult
|
|
177
|
+
& OneOf<{ reason: string }>
|
|
178
|
+
& OneOf<{ message: string }>
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
type BaseHealthCheckResult = {
|
|
182
|
+
status?: ResultStatus
|
|
183
|
+
checks?: CheckResult[]
|
|
184
|
+
executionStatus?: TaskStatus
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export type HealthCheckResult = BaseHealthCheckResult
|
|
188
|
+
& OneOf<{ reason: string }>
|
|
189
|
+
& OneOf<{ message: string }>
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
type BaseFunctionalCaseResult = {
|
|
193
|
+
id?: string
|
|
194
|
+
status?: ResultStatus
|
|
195
|
+
checks?: CheckResult[]
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export type FunctionalCaseResult = BaseFunctionalCaseResult
|
|
199
|
+
& OneOf<{ reason: string }>
|
|
200
|
+
& OneOf<{ message: string }>
|
|
201
|
+
|
|
202
|
+
export type FunctionalTestSummary = {
|
|
203
|
+
selected?: number
|
|
204
|
+
passed?: number
|
|
205
|
+
failed?: number
|
|
206
|
+
skipped?: number
|
|
207
|
+
partial?: number
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export type FunctionalTestReport = {
|
|
211
|
+
result?: ResultStatus
|
|
212
|
+
summary?: FunctionalTestSummary
|
|
213
|
+
cases?: FunctionalCaseResult[]
|
|
214
|
+
generatedAt?: GoogleProtobufTimestamp.Timestamp
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
type BaseExecutionProgress = {
|
|
219
|
+
unit?: string
|
|
220
|
+
completed?: number
|
|
221
|
+
currentItemId?: string
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export type ExecutionProgress = BaseExecutionProgress
|
|
225
|
+
& OneOf<{ total: number }>
|
|
226
|
+
|
|
227
|
+
export type ExecutionStatus = {
|
|
228
|
+
id?: string
|
|
229
|
+
state?: TaskStatus
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
export type InferenceTestTaskStatus = {
|
|
233
|
+
phase?: TaskStatus
|
|
234
|
+
startedAt?: GoogleProtobufTimestamp.Timestamp
|
|
235
|
+
completedAt?: GoogleProtobufTimestamp.Timestamp
|
|
236
|
+
reason?: string
|
|
237
|
+
message?: string
|
|
238
|
+
progress?: ExecutionProgress
|
|
239
|
+
functional?: FunctionalTestStatus
|
|
240
|
+
activeExecution?: ExecutionStatus
|
|
241
|
+
healthCheck?: HealthCheckResult
|
|
242
|
+
result?: ResultStatus
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
export type FunctionalCaseProgress = {
|
|
246
|
+
id?: string
|
|
247
|
+
executionStatus?: TaskStatus
|
|
248
|
+
result?: FunctionalCaseResult
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
export type FunctionalTestStatus = {
|
|
252
|
+
cases?: FunctionalCaseProgress[]
|
|
253
|
+
report?: FunctionalTestReport
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
export type FunctionalCaseGroup = {
|
|
257
|
+
group?: string
|
|
258
|
+
name?: InferyCommonCommon.I18nName
|
|
259
|
+
summary?: InferyCommonCommon.I18nName
|
|
260
|
+
description?: InferyCommonCommon.I18nName
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
export type FunctionalCaseDefinition = {
|
|
264
|
+
caseId?: string
|
|
265
|
+
group?: string
|
|
266
|
+
name?: InferyCommonCommon.I18nName
|
|
267
|
+
summary?: InferyCommonCommon.I18nName
|
|
268
|
+
description?: InferyCommonCommon.I18nName
|
|
269
|
+
parameterSchema?: GoogleProtobufStruct.Struct
|
|
270
|
+
enabled?: boolean
|
|
271
|
+
defaultSelected?: boolean
|
|
272
|
+
required?: boolean
|
|
273
|
+
uiConfig?: string
|
|
274
|
+
defaultParams?: GoogleProtobufStruct.Struct
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
export class InferenceTestManagement {
|
|
278
|
+
static CreateInferenceTestTask(req: CreateInferenceTestTaskRequest, initReq?: fm.InitReq): Promise<InferenceTestTask> {
|
|
279
|
+
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)})
|
|
280
|
+
}
|
|
281
|
+
static ListInferenceTestTasks(req: ListInferenceTestTasksRequest, initReq?: fm.InitReq): Promise<ListInferenceTestTasksResponse> {
|
|
282
|
+
return fm.fetchReq<ListInferenceTestTasksRequest, ListInferenceTestTasksResponse>(`/apis/infery.io/v1alpha1/workspaces/${req["workspace"]}/test-tasks?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
283
|
+
}
|
|
284
|
+
static GetInferenceTestTask(req: GetInferenceTestTaskRequest, initReq?: fm.InitReq): Promise<InferenceTestTask> {
|
|
285
|
+
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"})
|
|
286
|
+
}
|
|
287
|
+
static DeleteInferenceTestTask(req: DeleteInferenceTestTaskRequest, initReq?: fm.InitReq): Promise<InferenceTestTask> {
|
|
288
|
+
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"})
|
|
289
|
+
}
|
|
290
|
+
static UpdateInferenceTestTask(req: CreateInferenceTestTaskRequest, initReq?: fm.InitReq): Promise<InferenceTestTask> {
|
|
291
|
+
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)})
|
|
292
|
+
}
|
|
293
|
+
static PerformInferenceTestTaskAction(req: PerformInferenceTestTaskActionRequest, initReq?: fm.InitReq): Promise<InferenceTestTask> {
|
|
294
|
+
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)})
|
|
295
|
+
}
|
|
296
|
+
static GetFunctionalTestDefinition(req: GetFunctionalTestDefinitionRequest, initReq?: fm.InitReq): Promise<FunctionalTestDefinition> {
|
|
297
|
+
return fm.fetchReq<GetFunctionalTestDefinitionRequest, FunctionalTestDefinition>(`/apis/infery.io/v1alpha1/functional-test-definition?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
298
|
+
}
|
|
299
|
+
}
|