@daocloud-proto/baize 0.125.0 → 0.127.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.
@@ -24,6 +24,12 @@ export enum TolerationOperator {
24
24
  Equal = "Equal",
25
25
  }
26
26
 
27
+ export enum APIVersion {
28
+ API_VERSION_UNSPECIFIED = "API_VERSION_UNSPECIFIED",
29
+ API_V1_ALPHA1 = "API_V1_ALPHA1",
30
+ API_V1_ALPHA2 = "API_V1_ALPHA2",
31
+ }
32
+
27
33
  export type NoParamsQuery = {
28
34
  }
29
35
 
@@ -32,6 +32,7 @@ export enum DataSourceType {
32
32
  MODEL_SCOPE = "MODEL_SCOPE",
33
33
  CONDA = "CONDA",
34
34
  DATABASE = "DATABASE",
35
+ HADOOP = "HADOOP",
35
36
  }
36
37
 
37
38
  export enum DatasetStatusPhase {
@@ -131,6 +132,11 @@ export type Dataset = {
131
132
  resources?: BaizeCommonK8s.Resources
132
133
  }
133
134
 
135
+ export type GetDatasetResponse = {
136
+ dataset?: Dataset
137
+ secretOptions?: SecretOptions
138
+ }
139
+
134
140
  export type DataSourceOptionsConda = {
135
141
  pythonVersion?: string
136
142
  packageManager?: DataSourceOptionsCondaPackageManager
@@ -190,12 +196,19 @@ export type DataSourceOptionsDatabase = {
190
196
  extraParams?: {[key: string]: string}
191
197
  }
192
198
 
199
+ export type DataSourceOptionsHadoop = {
200
+ coreSiteXml?: string
201
+ hdfsSiteXml?: string
202
+ sourcePath?: string
203
+ username?: string
204
+ }
205
+
193
206
 
194
207
  /* baize modified */ export type BaseDataSourceOptions = {
195
208
  }
196
209
 
197
210
  export type DataSourceOptions = BaseDataSourceOptions
198
- & OneOf<{ git: DataSourceOptionsGit; s3: DataSourceOptionsS3; http: DataSourceOptionsHttp; conda: DataSourceOptionsConda; huggingFace: DataSourceOptionsHuggingFace; modelScope: DataSourceOptionsModelScope; reference: DataSourceOptionsReference; database: DataSourceOptionsDatabase }>
211
+ & OneOf<{ git: DataSourceOptionsGit; s3: DataSourceOptionsS3; http: DataSourceOptionsHttp; conda: DataSourceOptionsConda; huggingFace: DataSourceOptionsHuggingFace; modelScope: DataSourceOptionsModelScope; reference: DataSourceOptionsReference; database: DataSourceOptionsDatabase; hadoop: DataSourceOptionsHadoop }>
199
212
 
200
213
  export type SecretOptionsBasicAuth = {
201
214
  username?: string
@@ -283,7 +296,7 @@ export type SingleDatasetRequest = {
283
296
  }
284
297
 
285
298
  export type UpdateDatasetRequest = BaseUpdateDatasetRequest
286
- & OneOf<{ git: DataSourceOptionsGit; s3: DataSourceOptionsS3; http: DataSourceOptionsHttp; conda: DataSourceOptionsConda; huggingFace: DataSourceOptionsHuggingFace; modelScope: DataSourceOptionsModelScope; reference: DataSourceOptionsReference; database: DataSourceOptionsDatabase }>
299
+ & OneOf<{ git: DataSourceOptionsGit; s3: DataSourceOptionsS3; http: DataSourceOptionsHttp; conda: DataSourceOptionsConda; huggingFace: DataSourceOptionsHuggingFace; modelScope: DataSourceOptionsModelScope; reference: DataSourceOptionsReference; database: DataSourceOptionsDatabase; hadoop: DataSourceOptionsHadoop }>
287
300
 
288
301
  export type DatasetActionRequest = {
289
302
  workspace?: number
@@ -353,6 +366,14 @@ export type ListDatasetEventsRequest = {
353
366
  page?: BaizeCommonCommon.Pagination
354
367
  }
355
368
 
369
+ export type GetSecretOptionsRequest = {
370
+ workspace?: number
371
+ cluster?: string
372
+ namespace?: string
373
+ secretName?: string
374
+ sourceType?: DataSourceType
375
+ }
376
+
356
377
  export class DatasetManagement {
357
378
  static ListDatasets(req: ListDatasetRequest, initReq?: fm.InitReq): Promise<ListDatasetResponse> {
358
379
  return fm.fetchReq<ListDatasetRequest, ListDatasetResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/datasets?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
@@ -360,6 +381,9 @@ export class DatasetManagement {
360
381
  static GetDataset(req: SingleDatasetRequest, initReq?: fm.InitReq): Promise<Dataset> {
361
382
  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"})
362
383
  }
384
+ static GetSecretOptions(req: GetSecretOptionsRequest, initReq?: fm.InitReq): Promise<SecretOptions> {
385
+ 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"})
386
+ }
363
387
  static ListDatasetEvents(req: ListDatasetEventsRequest, initReq?: fm.InitReq): Promise<BaizeManagement_apiEventV1alpha1Event.ListEventsResponse> {
364
388
  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"})
365
389
  }
@@ -37,6 +37,11 @@ export enum RestartPolicy {
37
37
  RESTART_POLICY_ON_FAILURE = "RESTART_POLICY_ON_FAILURE",
38
38
  }
39
39
 
40
+ export enum SuspendReason {
41
+ SUSPEND_REASON_UNSPECIFIED = "SUSPEND_REASON_UNSPECIFIED",
42
+ SUSPEND_REASON_USER_ACTION = "SUSPEND_REASON_USER_ACTION",
43
+ }
44
+
40
45
  export enum ImagePullPolicy {
41
46
  IMAGE_PULL_POLICY_UNSPECIFIED = "IMAGE_PULL_POLICY_UNSPECIFIED",
42
47
  IMAGE_PULL_POLICY_ALWAYS = "IMAGE_PULL_POLICY_ALWAYS",
@@ -49,6 +54,7 @@ export enum JobActionRequestAction {
49
54
  RESTART = "RESTART",
50
55
  CHANGE_PRIORITY = "CHANGE_PRIORITY",
51
56
  SUSPEND = "SUSPEND",
57
+ RESUME = "RESUME",
52
58
  }
53
59
 
54
60
  export enum JobSchedulersResponseSchedulerFeature {
@@ -77,6 +83,9 @@ export type Job = {
77
83
  recoveryConfig?: BaizeManagement_apiJobV1alpha1Common.RecoveryConfig
78
84
  cleanCheckpointConfig?: CleanCheckpointConfig
79
85
  imagePullPolicy?: ImagePullPolicy
86
+ suspendReason?: SuspendReason
87
+ uid?: string
88
+ apiVersion?: BaizeCommonCommon.APIVersion
80
89
  }
81
90
 
82
91
  export type ListJobsRequest = {
@@ -6,14 +6,92 @@
6
6
 
7
7
  import * as BaizeCommonCommon from "../../../common/common.pb"
8
8
  import * as fm from "../../../fetch.pb"
9
- export type ListJobsRequest = {
9
+ import * as BaizeManagement_apiJobV1alpha1Common from "../v1alpha1/common.pb"
10
+ import * as BaizeManagement_apiJobV1alpha1Job from "../v1alpha1/job.pb"
11
+ export type Trainer = {
12
+ command?: string[]
13
+ args?: string[]
14
+ labels?: {[key: string]: string}
15
+ annotations?: {[key: string]: string}
16
+ queue?: string
17
+ trainingMode?: BaizeManagement_apiJobV1alpha1Common.TrainingMode
18
+ imagePullPolicy?: BaizeManagement_apiJobV1alpha1Job.ImagePullPolicy
19
+ checkpointConfig?: BaizeManagement_apiJobV1alpha1Job.CleanCheckpointConfig
20
+ }
21
+
22
+ export type RuntimeRef = {
23
+ name?: string
24
+ apiGroup?: string
25
+ kind?: string
26
+ }
27
+
28
+ export type DatasetInitializer = {
29
+ }
30
+
31
+ export type ModelInitializer = {
32
+ }
33
+
34
+ export type Initializer = {
35
+ model?: ModelInitializer
36
+ dataset?: DatasetInitializer
37
+ }
38
+
39
+ export type CreateJobRequest = {
10
40
  workspace?: number
11
41
  cluster?: string
12
42
  namespace?: string
13
- page?: BaizeCommonCommon.Pagination
43
+ name?: string
44
+ runtimeRef?: RuntimeRef
45
+ initializer?: Initializer
46
+ trainer?: Trainer
47
+ suspend?: boolean
48
+ description?: string
14
49
  }
15
50
 
16
51
  export type Job = {
52
+ workspace?: number
53
+ cluster?: string
54
+ namespace?: string
55
+ name?: string
56
+ runtimeRef?: RuntimeRef
57
+ initializer?: Initializer
58
+ trainer?: Trainer
59
+ suspend?: boolean
60
+ description?: string
61
+ }
62
+
63
+ export type GetJobRequest = {
64
+ workspace?: number
65
+ cluster?: string
66
+ namespace?: string
67
+ name?: string
68
+ }
69
+
70
+ export type DeleteJobRequest = {
71
+ workspace?: number
72
+ cluster?: string
73
+ namespace?: string
74
+ name?: string
75
+ }
76
+
77
+ export type ListRuntimesRequest = {
78
+ workspace?: number
79
+ cluster?: string
80
+ namespace?: string
81
+ page?: BaizeCommonCommon.Pagination
82
+ }
83
+
84
+ export type ListClusterRuntimesRequest = {
85
+ workspace?: number
86
+ cluster?: string
87
+ page?: BaizeCommonCommon.Pagination
88
+ }
89
+
90
+ export type ListJobsRequest = {
91
+ workspace?: number
92
+ cluster?: string
93
+ namespace?: string
94
+ page?: BaizeCommonCommon.Pagination
17
95
  }
18
96
 
19
97
  export type ListJobsResponse = {
@@ -21,8 +99,97 @@ export type ListJobsResponse = {
21
99
  page?: BaizeCommonCommon.Pagination
22
100
  }
23
101
 
102
+ export type CreateRuntimeRequest = {
103
+ workspace?: number
104
+ cluster?: string
105
+ namespace?: string
106
+ name?: string
107
+ }
108
+
109
+ export type Runtime = {
110
+ name?: string
111
+ }
112
+
113
+ export type ListRuntimesResponse = {
114
+ items?: Runtime[]
115
+ page?: BaizeCommonCommon.Pagination
116
+ }
117
+
118
+ export type ListClusterRuntimesResponse = {
119
+ items?: Runtime[]
120
+ page?: BaizeCommonCommon.Pagination
121
+ }
122
+
123
+ export type GetRuntimeRequest = {
124
+ workspace?: number
125
+ cluster?: string
126
+ namespace?: string
127
+ name?: string
128
+ }
129
+
130
+ export type GetClusterRuntimeRequest = {
131
+ workspace?: number
132
+ cluster?: string
133
+ name?: string
134
+ }
135
+
136
+ export type DeleteRuntimeRequest = {
137
+ workspace?: number
138
+ cluster?: string
139
+ namespace?: string
140
+ name?: string
141
+ }
142
+
143
+ export type DeleteClusterRuntimeRequest = {
144
+ workspace?: number
145
+ cluster?: string
146
+ name?: string
147
+ }
148
+
149
+ export type CreateClusterRuntimeRequest = {
150
+ workspace?: number
151
+ cluster?: string
152
+ name?: string
153
+ }
154
+
24
155
  export class JobService {
25
- static ListJobs(req: ListJobsRequest, initReq?: fm.InitReq): Promise<ListJobsResponse> {
26
- return fm.fetchReq<ListJobsRequest, ListJobsResponse>(`/apis/baize.io/v1alpha2/workspaces/${req["workspace"]}/jobs?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
156
+ static CreateJob(req: BaizeManagement_apiJobV1alpha1Job.CreateJobRequest, initReq?: fm.InitReq): Promise<BaizeManagement_apiJobV1alpha1Job.Job> {
157
+ return fm.fetchReq<BaizeManagement_apiJobV1alpha1Job.CreateJobRequest, BaizeManagement_apiJobV1alpha1Job.Job>(`/apis/baize.io/v1alpha2/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/jobs`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
158
+ }
159
+ static GetJob(req: BaizeManagement_apiJobV1alpha1Job.SingleJobRequest, initReq?: fm.InitReq): Promise<BaizeManagement_apiJobV1alpha1Job.Job> {
160
+ return fm.fetchReq<BaizeManagement_apiJobV1alpha1Job.SingleJobRequest, BaizeManagement_apiJobV1alpha1Job.Job>(`/apis/baize.io/v1alpha2/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/jobs/${req["name"]}?${fm.renderURLSearchParams(req, ["workspace", "cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
161
+ }
162
+ static DeleteJob(req: BaizeManagement_apiJobV1alpha1Job.SingleJobRequest, initReq?: fm.InitReq): Promise<BaizeManagement_apiJobV1alpha1Job.Job> {
163
+ return fm.fetchReq<BaizeManagement_apiJobV1alpha1Job.SingleJobRequest, BaizeManagement_apiJobV1alpha1Job.Job>(`/apis/baize.io/v1alpha2/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/jobs/${req["name"]}`, {...initReq, method: "DELETE", body: JSON.stringify(req, fm.replacer)})
164
+ }
165
+ static ListJobs(req: BaizeManagement_apiJobV1alpha1Job.ListJobsRequest, initReq?: fm.InitReq): Promise<BaizeManagement_apiJobV1alpha1Job.ListJobsResponse> {
166
+ return fm.fetchReq<BaizeManagement_apiJobV1alpha1Job.ListJobsRequest, BaizeManagement_apiJobV1alpha1Job.ListJobsResponse>(`/apis/baize.io/v1alpha2/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/jobs?${fm.renderURLSearchParams(req, ["workspace", "cluster", "namespace"])}`, {...initReq, method: "GET"})
167
+ }
168
+ static CreateRuntime(req: CreateRuntimeRequest, initReq?: fm.InitReq): Promise<Runtime> {
169
+ return fm.fetchReq<CreateRuntimeRequest, Runtime>(`/apis/baize.io/v1alpha2/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/runtimes`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
170
+ }
171
+ static ListRuntimes(req: ListRuntimesRequest, initReq?: fm.InitReq): Promise<ListRuntimesResponse> {
172
+ return fm.fetchReq<ListRuntimesRequest, ListRuntimesResponse>(`/apis/baize.io/v1alpha2/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/runtimes?${fm.renderURLSearchParams(req, ["workspace", "cluster", "namespace"])}`, {...initReq, method: "GET"})
173
+ }
174
+ static GetRuntime(req: GetRuntimeRequest, initReq?: fm.InitReq): Promise<Runtime> {
175
+ return fm.fetchReq<GetRuntimeRequest, Runtime>(`/apis/baize.io/v1alpha2/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/runtimes/${req["name"]}?${fm.renderURLSearchParams(req, ["workspace", "cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
176
+ }
177
+ static DeleteRuntime(req: DeleteRuntimeRequest, initReq?: fm.InitReq): Promise<Runtime> {
178
+ return fm.fetchReq<DeleteRuntimeRequest, Runtime>(`/apis/baize.io/v1alpha2/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/runtimes/${req["name"]}`, {...initReq, method: "DELETE", body: JSON.stringify(req, fm.replacer)})
179
+ }
180
+ static CreateClusterRuntime(req: CreateClusterRuntimeRequest, initReq?: fm.InitReq): Promise<Runtime> {
181
+ return fm.fetchReq<CreateClusterRuntimeRequest, Runtime>(`/apis/baize.io/v1alpha2/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/clusterruntimes`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
182
+ }
183
+ static ListClusterRuntimes(req: ListClusterRuntimesRequest, initReq?: fm.InitReq): Promise<ListClusterRuntimesResponse> {
184
+ return fm.fetchReq<ListClusterRuntimesRequest, ListClusterRuntimesResponse>(`/apis/baize.io/v1alpha2/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/clusterruntimes?${fm.renderURLSearchParams(req, ["workspace", "cluster"])}`, {...initReq, method: "GET"})
185
+ }
186
+ static GetClusterRuntime(req: GetClusterRuntimeRequest, initReq?: fm.InitReq): Promise<Runtime> {
187
+ return fm.fetchReq<GetClusterRuntimeRequest, Runtime>(`/apis/baize.io/v1alpha2/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/clusterruntimes/${req["name"]}?${fm.renderURLSearchParams(req, ["workspace", "cluster", "name"])}`, {...initReq, method: "GET"})
188
+ }
189
+ static DeleteClusterRuntime(req: DeleteClusterRuntimeRequest, initReq?: fm.InitReq): Promise<Runtime> {
190
+ return fm.fetchReq<DeleteClusterRuntimeRequest, Runtime>(`/apis/baize.io/v1alpha2/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/clusterruntimes/${req["name"]}`, {...initReq, method: "DELETE", body: JSON.stringify(req, fm.replacer)})
191
+ }
192
+ static DoJobAction(req: BaizeManagement_apiJobV1alpha1Job.JobActionRequest, initReq?: fm.InitReq): Promise<BaizeManagement_apiJobV1alpha1Job.Job> {
193
+ return fm.fetchReq<BaizeManagement_apiJobV1alpha1Job.JobActionRequest, BaizeManagement_apiJobV1alpha1Job.Job>(`/apis/baize.io/v1alpha2/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/jobs/${req["name"]}/actions`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
27
194
  }
28
195
  }
@@ -234,6 +234,7 @@ export type UpdateInferenceServingRequest = {
234
234
  image?: string
235
235
  imageConfig?: BaizeManagement_apiImageV1alpha1Image.ImageConfig
236
236
  targetGpus?: string[]
237
+ serviceConfig?: ServiceConfig
237
238
  }
238
239
 
239
240
  export type SingleInferenceServingRequest = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/baize",
3
- "version": "v0.125.0",
3
+ "version": "v0.127.0",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"