@daocloud-proto/baize 0.123.1 → 0.125.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",
|
|
@@ -168,12 +179,23 @@ export type DataSourceOptionsReference = {
|
|
|
168
179
|
sourceWorkspace?: BaizeManagement_apiWorkspaceV1alpha1Workspace.Workspace
|
|
169
180
|
}
|
|
170
181
|
|
|
182
|
+
export type DataSourceOptionsDatabase = {
|
|
183
|
+
type?: DataSourceOptionsDatabaseDBType
|
|
184
|
+
host?: string
|
|
185
|
+
port?: number
|
|
186
|
+
dbName?: string
|
|
187
|
+
tables?: string[]
|
|
188
|
+
charset?: string
|
|
189
|
+
exportFormat?: DataSourceOptionsDatabaseExportFormat
|
|
190
|
+
extraParams?: {[key: string]: string}
|
|
191
|
+
}
|
|
192
|
+
|
|
171
193
|
|
|
172
194
|
/* baize modified */ export type BaseDataSourceOptions = {
|
|
173
195
|
}
|
|
174
196
|
|
|
175
197
|
export type DataSourceOptions = BaseDataSourceOptions
|
|
176
|
-
& OneOf<{ git: DataSourceOptionsGit; s3: DataSourceOptionsS3; http: DataSourceOptionsHttp; conda: DataSourceOptionsConda; huggingFace: DataSourceOptionsHuggingFace; modelScope: DataSourceOptionsModelScope; reference: DataSourceOptionsReference }>
|
|
198
|
+
& OneOf<{ git: DataSourceOptionsGit; s3: DataSourceOptionsS3; http: DataSourceOptionsHttp; conda: DataSourceOptionsConda; huggingFace: DataSourceOptionsHuggingFace; modelScope: DataSourceOptionsModelScope; reference: DataSourceOptionsReference; database: DataSourceOptionsDatabase }>
|
|
177
199
|
|
|
178
200
|
export type SecretOptionsBasicAuth = {
|
|
179
201
|
username?: string
|
|
@@ -261,7 +283,7 @@ export type SingleDatasetRequest = {
|
|
|
261
283
|
}
|
|
262
284
|
|
|
263
285
|
export type UpdateDatasetRequest = BaseUpdateDatasetRequest
|
|
264
|
-
& OneOf<{ git: DataSourceOptionsGit; s3: DataSourceOptionsS3; http: DataSourceOptionsHttp; conda: DataSourceOptionsConda; huggingFace: DataSourceOptionsHuggingFace; modelScope: DataSourceOptionsModelScope; reference: DataSourceOptionsReference }>
|
|
286
|
+
& OneOf<{ git: DataSourceOptionsGit; s3: DataSourceOptionsS3; http: DataSourceOptionsHttp; conda: DataSourceOptionsConda; huggingFace: DataSourceOptionsHuggingFace; modelScope: DataSourceOptionsModelScope; reference: DataSourceOptionsReference; database: DataSourceOptionsDatabase }>
|
|
265
287
|
|
|
266
288
|
export type DatasetActionRequest = {
|
|
267
289
|
workspace?: number
|
|
@@ -312,6 +334,17 @@ export type ValidateDataSourceSecretsResponse = {
|
|
|
312
334
|
message?: string
|
|
313
335
|
}
|
|
314
336
|
|
|
337
|
+
export type ValidateDatabaseRequest = {
|
|
338
|
+
source?: DataSource
|
|
339
|
+
secretOptions?: SecretOptions
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
export type ValidateDatabaseResponse = {
|
|
343
|
+
success?: boolean
|
|
344
|
+
message?: string
|
|
345
|
+
tables?: string[]
|
|
346
|
+
}
|
|
347
|
+
|
|
315
348
|
export type ListDatasetEventsRequest = {
|
|
316
349
|
workspace?: number
|
|
317
350
|
cluster?: string
|
|
@@ -354,4 +387,7 @@ export class DatasetManagement {
|
|
|
354
387
|
static ValidateDataSourceSecrets(req: ValidateDataSourceSecretsRequest, initReq?: fm.InitReq): Promise<ValidateDataSourceSecretsResponse> {
|
|
355
388
|
return fm.fetchReq<ValidateDataSourceSecretsRequest, ValidateDataSourceSecretsResponse>(`/apis/baize.io/v1alpha1/datasets/validate-secrets`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
356
389
|
}
|
|
390
|
+
static ValidateDatabase(req: ValidateDatabaseRequest, initReq?: fm.InitReq): Promise<ValidateDatabaseResponse> {
|
|
391
|
+
return fm.fetchReq<ValidateDatabaseRequest, ValidateDatabaseResponse>(`/apis/baize.io/v1alpha1/datasets/validate-database`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
392
|
+
}
|
|
357
393
|
}
|
|
@@ -12,6 +12,12 @@ export enum QueueType {
|
|
|
12
12
|
KUEUE = "KUEUE",
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
export enum PlacementPolicy {
|
|
16
|
+
PLACEMENT_POLICY_UNSPECIFIED = "PLACEMENT_POLICY_UNSPECIFIED",
|
|
17
|
+
BALANCED = "BALANCED",
|
|
18
|
+
GROUPED = "GROUPED",
|
|
19
|
+
}
|
|
20
|
+
|
|
15
21
|
export enum TrainingMode {
|
|
16
22
|
TRAINING_MODE_UNSPECIFIED = "TRAINING_MODE_UNSPECIFIED",
|
|
17
23
|
SINGLE = "SINGLE",
|
|
@@ -63,6 +69,7 @@ export type JobCreationBaseConfig = {
|
|
|
63
69
|
noOverrideEnvPath?: boolean
|
|
64
70
|
imageConfig?: BaizeManagement_apiImageV1alpha1Image.ImageConfig
|
|
65
71
|
preflight?: boolean
|
|
72
|
+
placement?: PlacementPolicy
|
|
66
73
|
}
|
|
67
74
|
|
|
68
75
|
export type JobRoleDifferenceConfig = {
|
|
@@ -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 = {
|
|
@@ -156,6 +155,7 @@ export type InferenceServing = {
|
|
|
156
155
|
hpaConfig?: HPAConfig
|
|
157
156
|
image?: string
|
|
158
157
|
imageConfig?: BaizeManagement_apiImageV1alpha1Image.ImageConfig
|
|
158
|
+
targetGpus?: string[]
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
export type InferenceServingStatusModelStatus = {
|
|
@@ -215,6 +215,7 @@ export type CreateInferenceServingRequest = {
|
|
|
215
215
|
workspace?: number
|
|
216
216
|
image?: string
|
|
217
217
|
imageConfig?: BaizeManagement_apiImageV1alpha1Image.ImageConfig
|
|
218
|
+
targetGpus?: string[]
|
|
218
219
|
}
|
|
219
220
|
|
|
220
221
|
export type UpdateInferenceServingRequest = {
|
|
@@ -232,6 +233,7 @@ export type UpdateInferenceServingRequest = {
|
|
|
232
233
|
workspace?: number
|
|
233
234
|
image?: string
|
|
234
235
|
imageConfig?: BaizeManagement_apiImageV1alpha1Image.ImageConfig
|
|
236
|
+
targetGpus?: string[]
|
|
235
237
|
}
|
|
236
238
|
|
|
237
239
|
export type SingleInferenceServingRequest = {
|