@daocloud-proto/baize 0.111.0 → 0.111.2
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/management-api/cluster/v1alpha1/cluster.pb.ts +1 -0
- package/management-api/dataset/v1alpha1/dataset.pb.ts +14 -1
- package/management-api/device/v1alpha1/device.pb.ts +1 -0
- package/management-api/event/v1alpha1/event.pb.ts +51 -0
- package/management-api/job/v1alpha1/job.pb.ts +13 -0
- package/management-api/model/v1alpha1/model.pb.ts +1 -0
- package/management-api/notebook/v1alpha1/notebook.pb.ts +12 -0
- package/management-api/permission/v1alpha1/permission.pb.ts +26 -0
- package/management-api/queue/v1alpha1/queue.pb.ts +39 -0
- package/management-api/serving/v1alpha1/serving.pb.ts +46 -0
- package/package.json +1 -1
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
import * as BaizeCommonCommon 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 BaizeManagement_apiEventV1alpha1Event from "../../event/v1alpha1/event.pb"
|
|
10
11
|
import * as BaizeManagement_apiWorkspaceV1alpha1Workspace from "../../workspace/v1alpha1/workspace.pb"
|
|
11
12
|
|
|
12
13
|
type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
|
|
@@ -236,10 +237,11 @@ export type SingleDatasetRequest = {
|
|
|
236
237
|
secretOptions?: SecretOptions
|
|
237
238
|
share?: boolean
|
|
238
239
|
sharedStoWorkspaces?: number[]
|
|
240
|
+
uri?: string
|
|
239
241
|
}
|
|
240
242
|
|
|
241
243
|
export type UpdateDatasetRequest = BaseUpdateDatasetRequest
|
|
242
|
-
& OneOf<{ conda: DataSourceOptionsConda }>
|
|
244
|
+
& OneOf<{ git: DataSourceOptionsGit; s3: DataSourceOptionsS3; http: DataSourceOptionsHttp; conda: DataSourceOptionsConda; huggingFace: DataSourceOptionsHuggingFace; modelScope: DataSourceOptionsModelScope }>
|
|
243
245
|
|
|
244
246
|
export type DatasetActionRequest = {
|
|
245
247
|
workspace?: number
|
|
@@ -290,6 +292,14 @@ export type ValidateDataSourceSecretsResponse = {
|
|
|
290
292
|
message?: string
|
|
291
293
|
}
|
|
292
294
|
|
|
295
|
+
export type ListDatasetEventsRequest = {
|
|
296
|
+
workspace?: number
|
|
297
|
+
cluster?: string
|
|
298
|
+
namespace?: string
|
|
299
|
+
name?: string
|
|
300
|
+
page?: BaizeCommonCommon.Pagination
|
|
301
|
+
}
|
|
302
|
+
|
|
293
303
|
export class DatasetManagement {
|
|
294
304
|
static ListDatasets(req: ListDatasetRequest, initReq?: fm.InitReq): Promise<ListDatasetResponse> {
|
|
295
305
|
return fm.fetchReq<ListDatasetRequest, ListDatasetResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/datasets?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
@@ -297,6 +307,9 @@ export class DatasetManagement {
|
|
|
297
307
|
static GetDataset(req: SingleDatasetRequest, initReq?: fm.InitReq): Promise<Dataset> {
|
|
298
308
|
return fm.fetchReq<SingleDatasetRequest, Dataset>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/datasets/${req["name"]}?${fm.renderURLSearchParams(req, ["workspace", "cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
299
309
|
}
|
|
310
|
+
static ListDatasetEvents(req: ListDatasetEventsRequest, initReq?: fm.InitReq): Promise<BaizeManagement_apiEventV1alpha1Event.ListEventsResponse> {
|
|
311
|
+
return fm.fetchReq<ListDatasetEventsRequest, BaizeManagement_apiEventV1alpha1Event.ListEventsResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/datasets/${req["name"]}/events?${fm.renderURLSearchParams(req, ["workspace", "cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
312
|
+
}
|
|
300
313
|
static GetDatasetSyncProcess(req: SingleDatasetRequest, initReq?: fm.InitReq): Promise<DatasetSyncProcess> {
|
|
301
314
|
return fm.fetchReq<SingleDatasetRequest, DatasetSyncProcess>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/datasets/${req["name"]}/sync-process?${fm.renderURLSearchParams(req, ["workspace", "cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
302
315
|
}
|
|
@@ -0,0 +1,51 @@
|
|
|
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 BaizeCommonCommon from "../../../common/common.pb"
|
|
8
|
+
import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
|
|
9
|
+
|
|
10
|
+
export enum EventObjKind {
|
|
11
|
+
KIND_UNSPECIFIED = "KIND_UNSPECIFIED",
|
|
12
|
+
ANALYTICS = "ANALYTICS",
|
|
13
|
+
DATASET = "DATASET",
|
|
14
|
+
MODEL = "MODEL",
|
|
15
|
+
INFERENCE = "INFERENCE",
|
|
16
|
+
LABELING = "LABELING",
|
|
17
|
+
NOTEBOOK = "NOTEBOOK",
|
|
18
|
+
QUEUE = "QUEUE",
|
|
19
|
+
LOCAL_QUEUE = "LOCAL_QUEUE",
|
|
20
|
+
POD = "POD",
|
|
21
|
+
QUEUE_WORKLOAD = "QUEUE_WORKLOAD",
|
|
22
|
+
PYTORCH_JOB = "PYTORCH_JOB",
|
|
23
|
+
TF_JOB = "TF_JOB",
|
|
24
|
+
PADDLE_JOB = "PADDLE_JOB",
|
|
25
|
+
MXNET_JOB = "MXNET_JOB",
|
|
26
|
+
MPI_JOB = "MPI_JOB",
|
|
27
|
+
UNKNOWN = "UNKNOWN",
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export enum EventType {
|
|
31
|
+
TYPE_UNSPECIFIED = "TYPE_UNSPECIFIED",
|
|
32
|
+
NORMAL = "NORMAL",
|
|
33
|
+
WARNING = "WARNING",
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export type Event = {
|
|
37
|
+
objKind?: EventObjKind
|
|
38
|
+
objName?: string
|
|
39
|
+
objNamespace?: string
|
|
40
|
+
type?: EventType
|
|
41
|
+
message?: string
|
|
42
|
+
reason?: string
|
|
43
|
+
firstTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
44
|
+
lastTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
45
|
+
count?: number
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export type ListEventsResponse = {
|
|
49
|
+
items?: Event[]
|
|
50
|
+
page?: BaizeCommonCommon.Pagination
|
|
51
|
+
}
|
|
@@ -10,6 +10,7 @@ import * as fm from "../../../fetch.pb"
|
|
|
10
10
|
import * as GoogleProtobufStruct from "../../../google/protobuf/struct.pb"
|
|
11
11
|
import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
|
|
12
12
|
import * as BaizeManagement_apiAnalysisV1alpha1Analysis from "../../analysis/v1alpha1/analysis.pb"
|
|
13
|
+
import * as BaizeManagement_apiEventV1alpha1Event from "../../event/v1alpha1/event.pb"
|
|
13
14
|
import * as BaizeManagement_apiJobV1alpha1Common from "./common.pb"
|
|
14
15
|
|
|
15
16
|
type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
|
|
@@ -145,6 +146,15 @@ export type JobSchedulersResponse = {
|
|
|
145
146
|
items?: JobSchedulersResponseScheduler[]
|
|
146
147
|
}
|
|
147
148
|
|
|
149
|
+
export type ListJobEventsRequest = {
|
|
150
|
+
workspace?: number
|
|
151
|
+
type?: JobType
|
|
152
|
+
cluster?: string
|
|
153
|
+
namespace?: string
|
|
154
|
+
name?: string
|
|
155
|
+
page?: BaizeCommonCommon.Pagination
|
|
156
|
+
}
|
|
157
|
+
|
|
148
158
|
export class JobsManagement {
|
|
149
159
|
static ListJobs(req: ListJobsRequest, initReq?: fm.InitReq): Promise<ListJobsResponse> {
|
|
150
160
|
return fm.fetchReq<ListJobsRequest, ListJobsResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/jobs?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
@@ -152,6 +162,9 @@ export class JobsManagement {
|
|
|
152
162
|
static GetJob(req: SingleJobRequest, initReq?: fm.InitReq): Promise<Job> {
|
|
153
163
|
return fm.fetchReq<SingleJobRequest, Job>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/jobs/${req["name"]}?${fm.renderURLSearchParams(req, ["workspace", "cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
154
164
|
}
|
|
165
|
+
static ListJobEvents(req: ListJobEventsRequest, initReq?: fm.InitReq): Promise<BaizeManagement_apiEventV1alpha1Event.ListEventsResponse> {
|
|
166
|
+
return fm.fetchReq<ListJobEventsRequest, BaizeManagement_apiEventV1alpha1Event.ListEventsResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/jobs/${req["name"]}/events?${fm.renderURLSearchParams(req, ["workspace", "cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
167
|
+
}
|
|
155
168
|
static CreateJob(req: CreateJobRequest, initReq?: fm.InitReq): Promise<Job> {
|
|
156
169
|
return fm.fetchReq<CreateJobRequest, Job>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/jobs`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
157
170
|
}
|
|
@@ -9,6 +9,7 @@ import * as BaizeCommonK8s from "../../../common/k8s.pb"
|
|
|
9
9
|
import * as fm from "../../../fetch.pb"
|
|
10
10
|
import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
|
|
11
11
|
import * as BaizeManagement_apiAnalysisV1alpha1Analysis from "../../analysis/v1alpha1/analysis.pb"
|
|
12
|
+
import * as BaizeManagement_apiEventV1alpha1Event from "../../event/v1alpha1/event.pb"
|
|
12
13
|
import * as BaizeManagement_apiImageV1alpha1Image from "../../image/v1alpha1/image.pb"
|
|
13
14
|
|
|
14
15
|
type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
|
|
@@ -226,6 +227,14 @@ export type NotebookConnectionInfo = {
|
|
|
226
227
|
ssh?: NotebookConnectionInfoSSH
|
|
227
228
|
}
|
|
228
229
|
|
|
230
|
+
export type ListNotebookEventsRequest = {
|
|
231
|
+
workspace?: number
|
|
232
|
+
cluster?: string
|
|
233
|
+
namespace?: string
|
|
234
|
+
name?: string
|
|
235
|
+
page?: BaizeCommonCommon.Pagination
|
|
236
|
+
}
|
|
237
|
+
|
|
229
238
|
export class NotebookService {
|
|
230
239
|
static ListNotebooks(req: ListNotebooksRequest, initReq?: fm.InitReq): Promise<ListNotebooksResponse> {
|
|
231
240
|
return fm.fetchReq<ListNotebooksRequest, ListNotebooksResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/notebooks?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
@@ -233,6 +242,9 @@ export class NotebookService {
|
|
|
233
242
|
static GetNotebook(req: SingleNotebookRequest, initReq?: fm.InitReq): Promise<Notebook> {
|
|
234
243
|
return fm.fetchReq<SingleNotebookRequest, Notebook>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/notebooks/${req["name"]}?${fm.renderURLSearchParams(req, ["workspace", "cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
235
244
|
}
|
|
245
|
+
static ListNotebookEvents(req: ListNotebookEventsRequest, initReq?: fm.InitReq): Promise<BaizeManagement_apiEventV1alpha1Event.ListEventsResponse> {
|
|
246
|
+
return fm.fetchReq<ListNotebookEventsRequest, BaizeManagement_apiEventV1alpha1Event.ListEventsResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/notebooks/${req["name"]}/events?${fm.renderURLSearchParams(req, ["workspace", "cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
247
|
+
}
|
|
236
248
|
static GetNotebookConnectionInfo(req: SingleNotebookRequest, initReq?: fm.InitReq): Promise<NotebookConnectionInfo> {
|
|
237
249
|
return fm.fetchReq<SingleNotebookRequest, NotebookConnectionInfo>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/notebooks/${req["name"]}/connections?${fm.renderURLSearchParams(req, ["workspace", "cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
238
250
|
}
|
|
@@ -6,12 +6,38 @@
|
|
|
6
6
|
|
|
7
7
|
import * as BaizeCommonCommon from "../../../common/common.pb"
|
|
8
8
|
import * as fm from "../../../fetch.pb"
|
|
9
|
+
export type Permission = {
|
|
10
|
+
resourceType?: string
|
|
11
|
+
actions?: string[]
|
|
12
|
+
}
|
|
13
|
+
|
|
9
14
|
export type UserPermission = {
|
|
10
15
|
isBaizeOwner?: boolean
|
|
11
16
|
}
|
|
12
17
|
|
|
18
|
+
export type GetCurrentUserWorkspacePermissionRequest = {
|
|
19
|
+
workspaceId?: number
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export type GetCurrentUserWorkspacePermissionResponse = {
|
|
23
|
+
permission?: Permission[]
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type GetCurrentUserOperatorPermissionRequest = {
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export type GetCurrentUserOperatorPermissionResponse = {
|
|
30
|
+
permission?: Permission[]
|
|
31
|
+
}
|
|
32
|
+
|
|
13
33
|
export class PermissionService {
|
|
14
34
|
static GetCurrentUserPermission(req: BaizeCommonCommon.NoParamsQuery, initReq?: fm.InitReq): Promise<UserPermission> {
|
|
15
35
|
return fm.fetchReq<BaizeCommonCommon.NoParamsQuery, UserPermission>(`/apis/baize.io/v1alpha1/current-user/permission?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
16
36
|
}
|
|
37
|
+
static GetCurrentUserWorkspacePermissions(req: GetCurrentUserWorkspacePermissionRequest, initReq?: fm.InitReq): Promise<GetCurrentUserWorkspacePermissionResponse> {
|
|
38
|
+
return fm.fetchReq<GetCurrentUserWorkspacePermissionRequest, GetCurrentUserWorkspacePermissionResponse>(`/apis/baize.io/v1alpha1/current-user/ws-permissions?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
39
|
+
}
|
|
40
|
+
static GetCurrentUserOperatorPermissions(req: GetCurrentUserOperatorPermissionRequest, initReq?: fm.InitReq): Promise<GetCurrentUserOperatorPermissionResponse> {
|
|
41
|
+
return fm.fetchReq<GetCurrentUserOperatorPermissionRequest, GetCurrentUserOperatorPermissionResponse>(`/apis/baize.io/v1alpha1/current-user/operator-permissions?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
42
|
+
}
|
|
17
43
|
}
|
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import * as BaizeCommonCommon from "../../../common/common.pb"
|
|
8
|
+
import * as BaizeCommonK8s from "../../../common/k8s.pb"
|
|
8
9
|
import * as fm from "../../../fetch.pb"
|
|
10
|
+
import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
|
|
9
11
|
|
|
10
12
|
export enum QueueType {
|
|
11
13
|
QUEUE_TYPE_UNSPECIFIED = "QUEUE_TYPE_UNSPECIFIED",
|
|
@@ -44,6 +46,12 @@ export enum QueuePreemptionBorrowWithinCohortPolicy {
|
|
|
44
46
|
QUEUE_PREEMPTION_BORROW_WITHIN_COHORT_POLICY_LOWER_PRIORITY = "QUEUE_PREEMPTION_BORROW_WITHIN_COHORT_POLICY_LOWER_PRIORITY",
|
|
45
47
|
}
|
|
46
48
|
|
|
49
|
+
export enum QueueWorkloadPhase {
|
|
50
|
+
PHASE_UNSPECIFIED = "PHASE_UNSPECIFIED",
|
|
51
|
+
PENDING = "PENDING",
|
|
52
|
+
ADMITTED = "ADMITTED",
|
|
53
|
+
}
|
|
54
|
+
|
|
47
55
|
export type QueueResource = {
|
|
48
56
|
name?: string
|
|
49
57
|
value?: string
|
|
@@ -153,6 +161,34 @@ export type CreateLocalQueueResponse = {
|
|
|
153
161
|
status?: QueueStatus
|
|
154
162
|
}
|
|
155
163
|
|
|
164
|
+
export type QueueWorkload = {
|
|
165
|
+
cluster?: string
|
|
166
|
+
namespace?: string
|
|
167
|
+
queueName?: string
|
|
168
|
+
name?: string
|
|
169
|
+
totalPods?: number
|
|
170
|
+
totalResources?: BaizeCommonK8s.Resources
|
|
171
|
+
priorityClassName?: string
|
|
172
|
+
priority?: number
|
|
173
|
+
schedulerName?: string
|
|
174
|
+
preemptionPolicy?: string
|
|
175
|
+
creationTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
176
|
+
phase?: QueueWorkloadPhase
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export type ListQueueWorkloadRequest = {
|
|
180
|
+
cluster?: string
|
|
181
|
+
namespace?: string
|
|
182
|
+
queueName?: string
|
|
183
|
+
type?: QueueType
|
|
184
|
+
page?: BaizeCommonCommon.Pagination
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export type ListQueueWorkloadResponse = {
|
|
188
|
+
items?: QueueWorkload[]
|
|
189
|
+
page?: BaizeCommonCommon.Pagination
|
|
190
|
+
}
|
|
191
|
+
|
|
156
192
|
export class QueueManagement {
|
|
157
193
|
static ListQueues(req: ListQueueRequest, initReq?: fm.InitReq): Promise<ListQueueResponse> {
|
|
158
194
|
return fm.fetchReq<ListQueueRequest, ListQueueResponse>(`/apis/baize.io/v1alpha1/queues?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
@@ -178,4 +214,7 @@ export class QueueManagement {
|
|
|
178
214
|
static CreateLocalQueue(req: CreateLocalQueueRequest, initReq?: fm.InitReq): Promise<CreateLocalQueueResponse> {
|
|
179
215
|
return fm.fetchReq<CreateLocalQueueRequest, CreateLocalQueueResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/localqueues`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
180
216
|
}
|
|
217
|
+
static ListQueueWorkloads(req: ListQueueWorkloadRequest, initReq?: fm.InitReq): Promise<ListQueueWorkloadResponse> {
|
|
218
|
+
return fm.fetchReq<ListQueueWorkloadRequest, ListQueueWorkloadResponse>(`/apis/baize.io/v1alpha1/clusters/${req["cluster"]}/queues/${req["queueName"]}/workloads?${fm.renderURLSearchParams(req, ["cluster", "queueName"])}`, {...initReq, method: "GET"})
|
|
219
|
+
}
|
|
181
220
|
}
|
|
@@ -8,6 +8,8 @@ import * as BaizeCommonCommon from "../../../common/common.pb"
|
|
|
8
8
|
import * as BaizeCommonK8s from "../../../common/k8s.pb"
|
|
9
9
|
import * as fm from "../../../fetch.pb"
|
|
10
10
|
import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
|
|
11
|
+
import * as GoogleProtobufWrappers from "../../../google/protobuf/wrappers.pb"
|
|
12
|
+
import * as BaizeManagement_apiEventV1alpha1Event from "../../event/v1alpha1/event.pb"
|
|
11
13
|
import * as BaizeManagement_apiServingTritonModel_config from "../triton/model_config.pb"
|
|
12
14
|
|
|
13
15
|
type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
|
|
@@ -135,6 +137,7 @@ export type InferenceServing = {
|
|
|
135
137
|
lastUpdated?: GoogleProtobufTimestamp.Timestamp
|
|
136
138
|
authType?: ServingAuthAuthType
|
|
137
139
|
creationTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
140
|
+
hpaConfig?: HPAConfig
|
|
138
141
|
}
|
|
139
142
|
|
|
140
143
|
export type InferenceServingStatusModelStatus = {
|
|
@@ -162,6 +165,22 @@ export type ServingAuthTritonRestrictedKeyValue = {
|
|
|
162
165
|
export type ServingAuth = BaseServingAuth
|
|
163
166
|
& OneOf<{ tritonRestrictedKeyValue: ServingAuthTritonRestrictedKeyValue }>
|
|
164
167
|
|
|
168
|
+
export type HPAConfig = {
|
|
169
|
+
enabled?: boolean
|
|
170
|
+
minReplicas?: number
|
|
171
|
+
maxReplicas?: number
|
|
172
|
+
metrics?: Metrics[]
|
|
173
|
+
scaleUpStabilizationWindowSeconds?: GoogleProtobufWrappers.Int32Value
|
|
174
|
+
scaleDownStabilizationWindowSeconds?: GoogleProtobufWrappers.Int32Value
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export type Metrics = {
|
|
178
|
+
name?: string
|
|
179
|
+
value?: GoogleProtobufWrappers.Int32Value
|
|
180
|
+
avgValue?: GoogleProtobufWrappers.Int32Value
|
|
181
|
+
utilizationPercentage?: GoogleProtobufWrappers.Int32Value
|
|
182
|
+
}
|
|
183
|
+
|
|
165
184
|
export type CreateInferenceServingRequest = {
|
|
166
185
|
workspace?: number
|
|
167
186
|
name?: string
|
|
@@ -175,6 +194,7 @@ export type CreateInferenceServingRequest = {
|
|
|
175
194
|
podConfig?: BaizeCommonK8s.PodConfig
|
|
176
195
|
framework?: Framework
|
|
177
196
|
auth?: ServingAuth
|
|
197
|
+
hpaConfig?: HPAConfig
|
|
178
198
|
}
|
|
179
199
|
|
|
180
200
|
export type UpdateInferenceServingRequest = {
|
|
@@ -188,6 +208,7 @@ export type UpdateInferenceServingRequest = {
|
|
|
188
208
|
annotations?: {[key: string]: string}
|
|
189
209
|
podConfig?: BaizeCommonK8s.PodConfig
|
|
190
210
|
auth?: ServingAuth
|
|
211
|
+
hpaConfig?: HPAConfig
|
|
191
212
|
}
|
|
192
213
|
|
|
193
214
|
export type SingleInferenceServingRequest = {
|
|
@@ -209,6 +230,25 @@ export type ListInferenceServingsResponse = {
|
|
|
209
230
|
page?: BaizeCommonCommon.Pagination
|
|
210
231
|
}
|
|
211
232
|
|
|
233
|
+
export type GetServingHPARequest = {
|
|
234
|
+
name?: string
|
|
235
|
+
cluster?: string
|
|
236
|
+
namespace?: string
|
|
237
|
+
workspace?: number
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
export type GetServingHPAResponse = {
|
|
241
|
+
data?: string
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
export type ListInferenceEventsRequest = {
|
|
245
|
+
cluster?: string
|
|
246
|
+
namespace?: string
|
|
247
|
+
workspace?: number
|
|
248
|
+
name?: string
|
|
249
|
+
page?: BaizeCommonCommon.Pagination
|
|
250
|
+
}
|
|
251
|
+
|
|
212
252
|
export class InferenceServingManagement {
|
|
213
253
|
static CreateInferenceServing(req: CreateInferenceServingRequest, initReq?: fm.InitReq): Promise<InferenceServing> {
|
|
214
254
|
return fm.fetchReq<CreateInferenceServingRequest, InferenceServing>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/inference-serving`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
@@ -216,6 +256,12 @@ export class InferenceServingManagement {
|
|
|
216
256
|
static GetInferenceServing(req: SingleInferenceServingRequest, initReq?: fm.InitReq): Promise<InferenceServing> {
|
|
217
257
|
return fm.fetchReq<SingleInferenceServingRequest, InferenceServing>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/inference-serving/${req["name"]}?${fm.renderURLSearchParams(req, ["workspace", "cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
218
258
|
}
|
|
259
|
+
static GetInferenceServingHPA(req: GetServingHPARequest, initReq?: fm.InitReq): Promise<GetServingHPAResponse> {
|
|
260
|
+
return fm.fetchReq<GetServingHPARequest, GetServingHPAResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/inference-serving/${req["name"]}/hpa?${fm.renderURLSearchParams(req, ["workspace", "cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
261
|
+
}
|
|
262
|
+
static ListInferenceEvents(req: ListInferenceEventsRequest, initReq?: fm.InitReq): Promise<BaizeManagement_apiEventV1alpha1Event.ListEventsResponse> {
|
|
263
|
+
return fm.fetchReq<ListInferenceEventsRequest, BaizeManagement_apiEventV1alpha1Event.ListEventsResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/inference-serving/${req["name"]}/events?${fm.renderURLSearchParams(req, ["workspace", "cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
264
|
+
}
|
|
219
265
|
static ListInferenceServings(req: ListInferenceServingsRequest, initReq?: fm.InitReq): Promise<ListInferenceServingsResponse> {
|
|
220
266
|
return fm.fetchReq<ListInferenceServingsRequest, ListInferenceServingsResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/inference-serving?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
221
267
|
}
|