@daocloud-proto/baize 0.124.0 → 0.126.0

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/k8s.pb.ts CHANGED
@@ -57,6 +57,21 @@ export type ResourceAffinity = {
57
57
  value?: string
58
58
  }
59
59
 
60
+ export type Port = {
61
+ name?: string
62
+ hostPort?: number
63
+ containerPort?: number
64
+ protocol?: string
65
+ }
66
+
67
+ export type ServicePort = {
68
+ name?: string
69
+ protocol?: string
70
+ port?: number
71
+ targetPort?: number
72
+ nodePort?: number
73
+ }
74
+
60
75
  export type PodConfig = {
61
76
  kubeEnvs?: KubeEnv[]
62
77
  kubeVolumes?: KubeVolume[]
@@ -72,6 +87,7 @@ export type PodConfig = {
72
87
  readinessProbe?: Probe
73
88
  startupProbe?: Probe
74
89
  tolerations?: BaizeCommonCommon.Toleration[]
90
+ ports?: Port[]
75
91
  }
76
92
 
77
93
 
@@ -31,6 +31,7 @@ export enum DataSourceType {
31
31
  HUGGING_FACE = "HUGGING_FACE",
32
32
  MODEL_SCOPE = "MODEL_SCOPE",
33
33
  CONDA = "CONDA",
34
+ DATABASE = "DATABASE",
34
35
  }
35
36
 
36
37
  export enum DatasetStatusPhase {
@@ -71,6 +72,16 @@ export enum DataSourceOptionsS3Provider {
71
72
  MINIO = "MINIO",
72
73
  }
73
74
 
75
+ export enum DataSourceOptionsDatabaseExportFormat {
76
+ Export_Format_UNSPECIFIED = "Export_Format_UNSPECIFIED",
77
+ CSV = "CSV",
78
+ }
79
+
80
+ export enum DataSourceOptionsDatabaseDBType {
81
+ DB_TYPE_UNSPECIFIED = "DB_TYPE_UNSPECIFIED",
82
+ MYSQL = "MYSQL",
83
+ }
84
+
74
85
  export enum SecretOptionsAuthType {
75
86
  AUTH_TYPE_UNSPECIFIED = "AUTH_TYPE_UNSPECIFIED",
76
87
  BASIC = "BASIC",
@@ -120,6 +131,11 @@ export type Dataset = {
120
131
  resources?: BaizeCommonK8s.Resources
121
132
  }
122
133
 
134
+ export type GetDatasetResponse = {
135
+ dataset?: Dataset
136
+ secretOptions?: SecretOptions
137
+ }
138
+
123
139
  export type DataSourceOptionsConda = {
124
140
  pythonVersion?: string
125
141
  packageManager?: DataSourceOptionsCondaPackageManager
@@ -168,12 +184,23 @@ export type DataSourceOptionsReference = {
168
184
  sourceWorkspace?: BaizeManagement_apiWorkspaceV1alpha1Workspace.Workspace
169
185
  }
170
186
 
187
+ export type DataSourceOptionsDatabase = {
188
+ type?: DataSourceOptionsDatabaseDBType
189
+ host?: string
190
+ port?: number
191
+ dbName?: string
192
+ tables?: string[]
193
+ charset?: string
194
+ exportFormat?: DataSourceOptionsDatabaseExportFormat
195
+ extraParams?: {[key: string]: string}
196
+ }
197
+
171
198
 
172
199
  /* baize modified */ export type BaseDataSourceOptions = {
173
200
  }
174
201
 
175
202
  export type DataSourceOptions = BaseDataSourceOptions
176
- & OneOf<{ git: DataSourceOptionsGit; s3: DataSourceOptionsS3; http: DataSourceOptionsHttp; conda: DataSourceOptionsConda; huggingFace: DataSourceOptionsHuggingFace; modelScope: DataSourceOptionsModelScope; reference: DataSourceOptionsReference }>
203
+ & OneOf<{ git: DataSourceOptionsGit; s3: DataSourceOptionsS3; http: DataSourceOptionsHttp; conda: DataSourceOptionsConda; huggingFace: DataSourceOptionsHuggingFace; modelScope: DataSourceOptionsModelScope; reference: DataSourceOptionsReference; database: DataSourceOptionsDatabase }>
177
204
 
178
205
  export type SecretOptionsBasicAuth = {
179
206
  username?: string
@@ -261,7 +288,7 @@ export type SingleDatasetRequest = {
261
288
  }
262
289
 
263
290
  export type UpdateDatasetRequest = BaseUpdateDatasetRequest
264
- & OneOf<{ git: DataSourceOptionsGit; s3: DataSourceOptionsS3; http: DataSourceOptionsHttp; conda: DataSourceOptionsConda; huggingFace: DataSourceOptionsHuggingFace; modelScope: DataSourceOptionsModelScope; reference: DataSourceOptionsReference }>
291
+ & OneOf<{ git: DataSourceOptionsGit; s3: DataSourceOptionsS3; http: DataSourceOptionsHttp; conda: DataSourceOptionsConda; huggingFace: DataSourceOptionsHuggingFace; modelScope: DataSourceOptionsModelScope; reference: DataSourceOptionsReference; database: DataSourceOptionsDatabase }>
265
292
 
266
293
  export type DatasetActionRequest = {
267
294
  workspace?: number
@@ -312,6 +339,17 @@ export type ValidateDataSourceSecretsResponse = {
312
339
  message?: string
313
340
  }
314
341
 
342
+ export type ValidateDatabaseRequest = {
343
+ source?: DataSource
344
+ secretOptions?: SecretOptions
345
+ }
346
+
347
+ export type ValidateDatabaseResponse = {
348
+ success?: boolean
349
+ message?: string
350
+ tables?: string[]
351
+ }
352
+
315
353
  export type ListDatasetEventsRequest = {
316
354
  workspace?: number
317
355
  cluster?: string
@@ -320,6 +358,14 @@ export type ListDatasetEventsRequest = {
320
358
  page?: BaizeCommonCommon.Pagination
321
359
  }
322
360
 
361
+ export type GetSecretOptionsRequest = {
362
+ workspace?: number
363
+ cluster?: string
364
+ namespace?: string
365
+ secretName?: string
366
+ sourceType?: DataSourceType
367
+ }
368
+
323
369
  export class DatasetManagement {
324
370
  static ListDatasets(req: ListDatasetRequest, initReq?: fm.InitReq): Promise<ListDatasetResponse> {
325
371
  return fm.fetchReq<ListDatasetRequest, ListDatasetResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/datasets?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
@@ -327,6 +373,9 @@ export class DatasetManagement {
327
373
  static GetDataset(req: SingleDatasetRequest, initReq?: fm.InitReq): Promise<Dataset> {
328
374
  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"})
329
375
  }
376
+ static GetSecretOptions(req: GetSecretOptionsRequest, initReq?: fm.InitReq): Promise<SecretOptions> {
377
+ return fm.fetchReq<GetSecretOptionsRequest, SecretOptions>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/secret-options/${req["secretName"]}?${fm.renderURLSearchParams(req, ["workspace", "cluster", "namespace", "secretName"])}`, {...initReq, method: "GET"})
378
+ }
330
379
  static ListDatasetEvents(req: ListDatasetEventsRequest, initReq?: fm.InitReq): Promise<BaizeManagement_apiEventV1alpha1Event.ListEventsResponse> {
331
380
  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"})
332
381
  }
@@ -354,4 +403,7 @@ export class DatasetManagement {
354
403
  static ValidateDataSourceSecrets(req: ValidateDataSourceSecretsRequest, initReq?: fm.InitReq): Promise<ValidateDataSourceSecretsResponse> {
355
404
  return fm.fetchReq<ValidateDataSourceSecretsRequest, ValidateDataSourceSecretsResponse>(`/apis/baize.io/v1alpha1/datasets/validate-secrets`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
356
405
  }
406
+ static ValidateDatabase(req: ValidateDatabaseRequest, initReq?: fm.InitReq): Promise<ValidateDatabaseResponse> {
407
+ return fm.fetchReq<ValidateDatabaseRequest, ValidateDatabaseResponse>(`/apis/baize.io/v1alpha1/datasets/validate-database`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
408
+ }
357
409
  }
@@ -82,6 +82,12 @@ export type NotebookConfig = {
82
82
  imageConfig?: BaizeManagement_apiImageV1alpha1Image.ImageConfig
83
83
  shmSize?: number
84
84
  enableDind?: boolean
85
+ command?: Command
86
+ }
87
+
88
+ export type Command = {
89
+ commands?: string[]
90
+ args?: string[]
85
91
  }
86
92
 
87
93
  export type NotebookStatus = {
@@ -33,6 +33,7 @@ export enum FrameworkType {
33
33
  FRAMEWORK_TYPE_UNSPECIFIED = "FRAMEWORK_TYPE_UNSPECIFIED",
34
34
  FRAMEWORK_TYPE_TRITON = "FRAMEWORK_TYPE_TRITON",
35
35
  FRAMEWORK_TYPE_VLLM = "FRAMEWORK_TYPE_VLLM",
36
+ FRAMEWORK_TYPE_CUSTOM = "FRAMEWORK_TYPE_CUSTOM",
36
37
  }
37
38
 
38
39
  export enum FrameworkTritonBackend {
@@ -66,6 +67,9 @@ export type FrameworkTriton = {
66
67
  export type FrameworkVLLM = {
67
68
  }
68
69
 
70
+ export type FrameworkCustom = {
71
+ }
72
+
69
73
 
70
74
  /* baize modified */ export type BaseFramework = {
71
75
  type?: FrameworkType
@@ -74,7 +78,7 @@ export type FrameworkVLLM = {
74
78
  }
75
79
 
76
80
  export type Framework = BaseFramework
77
- & OneOf<{ triton: FrameworkTriton; vllm: FrameworkVLLM }>
81
+ & OneOf<{ triton: FrameworkTriton; vllm: FrameworkVLLM; custom: FrameworkCustom }>
78
82
 
79
83
  export type Model = {
80
84
  name?: string
@@ -82,16 +86,6 @@ export type Model = {
82
86
  modelPath?: string
83
87
  }
84
88
 
85
- export type CustomArg = {
86
- name?: string
87
- values?: string[]
88
- }
89
-
90
- export type CustomCmd = {
91
- command?: string
92
- args?: CustomArg[]
93
- }
94
-
95
89
  export type ServingConfigVLLMLoraModel = {
96
90
  volume?: BaizeCommonK8s.KubeVolume
97
91
  relativePath?: string
@@ -109,6 +103,10 @@ export type ServingConfigVLLM = {
109
103
  shouldSkip?: boolean
110
104
  }
111
105
 
106
+ export type ServingConfigCustomServing = {
107
+ cmdLine?: string
108
+ }
109
+
112
110
  export type ServingConfigTritonModelConfig = {
113
111
  inputs?: BaizeManagement_apiServingTritonModel_config.ModelInput[]
114
112
  outputs?: BaizeManagement_apiServingTritonModel_config.ModelOutput[]
@@ -132,10 +130,11 @@ export type ServingConfigTritonServingConfig = BaseServingConfigTritonServingCon
132
130
  }
133
131
 
134
132
  export type ServingConfig = BaseServingConfig
135
- & OneOf<{ triton: ServingConfigTritonServingConfig; vllm: ServingConfigVLLM }>
133
+ & OneOf<{ triton: ServingConfigTritonServingConfig; vllm: ServingConfigVLLM; custom: ServingConfigCustomServing }>
136
134
 
137
135
  export type ServiceConfig = {
138
136
  serviceType?: ServiceType
137
+ ports?: BaizeCommonK8s.ServicePort[]
139
138
  }
140
139
 
141
140
  export type InferenceServing = {
@@ -235,6 +234,7 @@ export type UpdateInferenceServingRequest = {
235
234
  image?: string
236
235
  imageConfig?: BaizeManagement_apiImageV1alpha1Image.ImageConfig
237
236
  targetGpus?: string[]
237
+ serviceConfig?: ServiceConfig
238
238
  }
239
239
 
240
240
  export type SingleInferenceServingRequest = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/baize",
3
- "version": "v0.124.0",
3
+ "version": "v0.126.0",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"