@daocloud-proto/baize 0.110.5 → 0.111.1

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.
@@ -31,13 +31,22 @@ export type Auth = {
31
31
  operator?: AuthResourceAction
32
32
  }
33
33
 
34
+ export type AuditObject = {
35
+ nameKey?: string
36
+ namespaceKey?: string
37
+ clusterKey?: string
38
+ }
39
+
40
+ export type AuditObjectKind = {
41
+ kindName?: string
42
+ kindGroup?: string
43
+ kindVersion?: string
44
+ kindKey?: string
45
+ }
46
+
34
47
  export type Audit = {
35
- objectNsKey?: string
36
- objectNameKey?: string
37
- objectKindName?: string
38
- objectKindGroup?: string
39
- objectKindVersion?: string
40
- objectKindKey?: string
48
+ object?: AuditObject
49
+ objectKind?: AuditObjectKind
41
50
  action?: string
42
51
  actionKey?: string
43
52
  customObject?: boolean
@@ -27,6 +27,7 @@ export enum DataSourceType {
27
27
  NFS = "NFS",
28
28
  REFERENCE = "REFERENCE",
29
29
  HUGGING_FACE = "HUGGING_FACE",
30
+ MODEL_SCOPE = "MODEL_SCOPE",
30
31
  CONDA = "CONDA",
31
32
  }
32
33
 
@@ -50,6 +51,12 @@ export enum DataSourceOptionsHuggingFaceRepoType {
50
51
  DATASET = "DATASET",
51
52
  }
52
53
 
54
+ export enum DataSourceOptionsModelScopeRepoType {
55
+ REPO_TYPE_UNSPECIFIED = "REPO_TYPE_UNSPECIFIED",
56
+ MODEL = "MODEL",
57
+ DATASET = "DATASET",
58
+ }
59
+
53
60
  export enum DataSourceOptionsS3Provider {
54
61
  PROVIDER_UNSPECIFIED = "PROVIDER_UNSPECIFIED",
55
62
  AWS = "AWS",
@@ -119,6 +126,14 @@ export type DataSourceOptionsHuggingFace = {
119
126
  endpoint?: string
120
127
  include?: string
121
128
  exclude?: string
129
+ revision?: string
130
+ }
131
+
132
+ export type DataSourceOptionsModelScope = {
133
+ repoType?: DataSourceOptionsModelScopeRepoType
134
+ include?: string
135
+ exclude?: string
136
+ revision?: string
122
137
  }
123
138
 
124
139
  export type DataSourceOptionsGit = {
@@ -143,7 +158,7 @@ export type DataSourceOptionsHttp = {
143
158
  }
144
159
 
145
160
  export type DataSourceOptions = BaseDataSourceOptions
146
- & OneOf<{ git: DataSourceOptionsGit; s3: DataSourceOptionsS3; http: DataSourceOptionsHttp; conda: DataSourceOptionsConda; huggingFace: DataSourceOptionsHuggingFace }>
161
+ & OneOf<{ git: DataSourceOptionsGit; s3: DataSourceOptionsS3; http: DataSourceOptionsHttp; conda: DataSourceOptionsConda; huggingFace: DataSourceOptionsHuggingFace; modelScope: DataSourceOptionsModelScope }>
147
162
 
148
163
  export type SecretOptionsBasicAuth = {
149
164
  username?: string
@@ -221,10 +236,11 @@ export type SingleDatasetRequest = {
221
236
  secretOptions?: SecretOptions
222
237
  share?: boolean
223
238
  sharedStoWorkspaces?: number[]
239
+ uri?: string
224
240
  }
225
241
 
226
242
  export type UpdateDatasetRequest = BaseUpdateDatasetRequest
227
- & OneOf<{ conda: DataSourceOptionsConda }>
243
+ & OneOf<{ git: DataSourceOptionsGit; s3: DataSourceOptionsS3; http: DataSourceOptionsHttp; conda: DataSourceOptionsConda; huggingFace: DataSourceOptionsHuggingFace; modelScope: DataSourceOptionsModelScope }>
228
244
 
229
245
  export type DatasetActionRequest = {
230
246
  workspace?: number
@@ -265,6 +281,16 @@ export type DatasetSyncProcess = {
265
281
  syncProcess?: number
266
282
  }
267
283
 
284
+ export type ValidateDataSourceSecretsRequest = {
285
+ source?: DataSource
286
+ secretOptions?: SecretOptions
287
+ }
288
+
289
+ export type ValidateDataSourceSecretsResponse = {
290
+ valid?: boolean
291
+ message?: string
292
+ }
293
+
268
294
  export class DatasetManagement {
269
295
  static ListDatasets(req: ListDatasetRequest, initReq?: fm.InitReq): Promise<ListDatasetResponse> {
270
296
  return fm.fetchReq<ListDatasetRequest, ListDatasetResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/datasets?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
@@ -293,4 +319,7 @@ export class DatasetManagement {
293
319
  static GetRelatedInstances(req: RelatedInstancesRequest, initReq?: fm.InitReq): Promise<RelatedInstancesResponse> {
294
320
  return fm.fetchReq<RelatedInstancesRequest, RelatedInstancesResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/datasets/${req["name"]}/related-instances?${fm.renderURLSearchParams(req, ["workspace", "cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
295
321
  }
322
+ static ValidateDataSourceSecrets(req: ValidateDataSourceSecretsRequest, initReq?: fm.InitReq): Promise<ValidateDataSourceSecretsResponse> {
323
+ return fm.fetchReq<ValidateDataSourceSecretsRequest, ValidateDataSourceSecretsResponse>(`/apis/baize.io/v1alpha1/datasets/validate-secrets`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
324
+ }
296
325
  }
@@ -176,6 +176,14 @@ export type AdminOverviewDashboardRequest = {
176
176
  to?: string
177
177
  }
178
178
 
179
+ export type NvidiaGPUGrafanaDashboardRequest = {
180
+ cluster?: string
181
+ node?: string
182
+ gpuIndex?: string
183
+ from?: string
184
+ to?: string
185
+ }
186
+
179
187
  export class MetricsService {
180
188
  static QueryMultipleVectors(req: QueryMultipleVectorRequest, initReq?: fm.InitReq): Promise<MultipleVectorQueryResponse> {
181
189
  return fm.fetchReq<QueryMultipleVectorRequest, MultipleVectorQueryResponse>(`/apis/baize.io/v1alpha1/metrics/multiple-queries?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
@@ -198,4 +206,7 @@ export class MetricsService {
198
206
  static GetInferenceServiceGrafanaDashboard(req: InferenceServiceGrafanaDashboardRequest, initReq?: fm.InitReq): Promise<GrafanaDashboard> {
199
207
  return fm.fetchReq<InferenceServiceGrafanaDashboardRequest, GrafanaDashboard>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/inference-serving/${req["inference"]}/service-grafana-dashboards?${fm.renderURLSearchParams(req, ["workspace", "cluster", "namespace", "inference"])}`, {...initReq, method: "GET"})
200
208
  }
209
+ static GetNvidiaGPUGrafanaDashboard(req: NvidiaGPUGrafanaDashboardRequest, initReq?: fm.InitReq): Promise<GrafanaDashboard> {
210
+ return fm.fetchReq<NvidiaGPUGrafanaDashboardRequest, GrafanaDashboard>(`/apis/baize.io/v1alpha1/grafana-dashboards/nvidia-gpu-overview?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
211
+ }
201
212
  }
@@ -108,6 +108,8 @@ export type Model = {
108
108
  tags?: string[]
109
109
  readme?: string
110
110
  status?: ModelStatus
111
+ displayName?: string
112
+ creationTimestamp?: GoogleProtobufTimestamp.Timestamp
111
113
  }
112
114
 
113
115
  export type ListModelsRequest = {
@@ -145,6 +147,7 @@ export type CreateModelRequest = {
145
147
  readme?: string
146
148
  share?: boolean
147
149
  sharedToWorkspaces?: Workspace[]
150
+ displayName?: string
148
151
  }
149
152
 
150
153
  export type UpdateModelRequest = {
@@ -162,6 +165,7 @@ export type UpdateModelRequest = {
162
165
  readme?: string
163
166
  share?: boolean
164
167
  sharedToWorkspaces?: Workspace[]
168
+ displayName?: string
165
169
  }
166
170
 
167
171
  export type CreateModelVersionRequest = {
@@ -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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/baize",
3
- "version": "v0.110.5",
3
+ "version": "v0.111.1",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"