@daocloud-proto/baize 0.111.1 → 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.
@@ -19,6 +19,7 @@ export type AICluster = {
19
19
  name?: string
20
20
  withAiSuite?: boolean
21
21
  clusterStatus?: ClusterStatus
22
+ withMetricsServer?: boolean
22
23
  }
23
24
 
24
25
  export type ListAIClustersRequest = {
@@ -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 };
@@ -291,6 +292,14 @@ export type ValidateDataSourceSecretsResponse = {
291
292
  message?: string
292
293
  }
293
294
 
295
+ export type ListDatasetEventsRequest = {
296
+ workspace?: number
297
+ cluster?: string
298
+ namespace?: string
299
+ name?: string
300
+ page?: BaizeCommonCommon.Pagination
301
+ }
302
+
294
303
  export class DatasetManagement {
295
304
  static ListDatasets(req: ListDatasetRequest, initReq?: fm.InitReq): Promise<ListDatasetResponse> {
296
305
  return fm.fetchReq<ListDatasetRequest, ListDatasetResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/datasets?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
@@ -298,6 +307,9 @@ export class DatasetManagement {
298
307
  static GetDataset(req: SingleDatasetRequest, initReq?: fm.InitReq): Promise<Dataset> {
299
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"})
300
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
+ }
301
313
  static GetDatasetSyncProcess(req: SingleDatasetRequest, initReq?: fm.InitReq): Promise<DatasetSyncProcess> {
302
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"})
303
315
  }
@@ -19,6 +19,7 @@ export type DeviceGPU = {
19
19
  vendor?: string
20
20
  totalFrameBufferMemory?: string
21
21
  usedFrameBufferMemory?: string
22
+ nodeName?: string
22
23
  }
23
24
 
24
25
  export type ListDevicesGPUsResponse = {
@@ -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
  }
@@ -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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/baize",
3
- "version": "v0.111.1",
3
+ "version": "v0.111.2",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"