@daocloud-proto/baize 0.126.0 → 0.127.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.
@@ -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 {
@@ -195,12 +196,19 @@ export type DataSourceOptionsDatabase = {
195
196
  extraParams?: {[key: string]: string}
196
197
  }
197
198
 
199
+ export type DataSourceOptionsHadoop = {
200
+ coreSiteXml?: string
201
+ hdfsSiteXml?: string
202
+ sourcePath?: string
203
+ username?: string
204
+ }
205
+
198
206
 
199
207
  /* baize modified */ export type BaseDataSourceOptions = {
200
208
  }
201
209
 
202
210
  export type DataSourceOptions = BaseDataSourceOptions
203
- & 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 }>
204
212
 
205
213
  export type SecretOptionsBasicAuth = {
206
214
  username?: string
@@ -288,7 +296,7 @@ export type SingleDatasetRequest = {
288
296
  }
289
297
 
290
298
  export type UpdateDatasetRequest = BaseUpdateDatasetRequest
291
- & 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 }>
292
300
 
293
301
  export type DatasetActionRequest = {
294
302
  workspace?: number
@@ -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,8 @@ export type Job = {
77
83
  recoveryConfig?: BaizeManagement_apiJobV1alpha1Common.RecoveryConfig
78
84
  cleanCheckpointConfig?: CleanCheckpointConfig
79
85
  imagePullPolicy?: ImagePullPolicy
86
+ suspendReason?: SuspendReason
87
+ uid?: string
80
88
  }
81
89
 
82
90
  export type ListJobsRequest = {
@@ -6,14 +6,93 @@
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_apiEventV1alpha1Event from "../../event/v1alpha1/event.pb"
10
+ import * as BaizeManagement_apiJobV1alpha1Common from "../v1alpha1/common.pb"
11
+ import * as BaizeManagement_apiJobV1alpha1Job from "../v1alpha1/job.pb"
12
+ export type Trainer = {
13
+ command?: string[]
14
+ args?: string[]
15
+ labels?: {[key: string]: string}
16
+ annotations?: {[key: string]: string}
17
+ queue?: string
18
+ trainingMode?: BaizeManagement_apiJobV1alpha1Common.TrainingMode
19
+ imagePullPolicy?: BaizeManagement_apiJobV1alpha1Job.ImagePullPolicy
20
+ checkpointConfig?: BaizeManagement_apiJobV1alpha1Job.CleanCheckpointConfig
21
+ }
22
+
23
+ export type RuntimeRef = {
24
+ name?: string
25
+ apiGroup?: string
26
+ kind?: string
27
+ }
28
+
29
+ export type DatasetInitializer = {
30
+ }
31
+
32
+ export type ModelInitializer = {
33
+ }
34
+
35
+ export type Initializer = {
36
+ model?: ModelInitializer
37
+ dataset?: DatasetInitializer
38
+ }
39
+
40
+ export type CreateJobRequest = {
10
41
  workspace?: number
11
42
  cluster?: string
12
43
  namespace?: string
13
- page?: BaizeCommonCommon.Pagination
44
+ name?: string
45
+ runtimeRef?: RuntimeRef
46
+ initializer?: Initializer
47
+ trainer?: Trainer
48
+ suspend?: boolean
49
+ description?: string
14
50
  }
15
51
 
16
52
  export type Job = {
53
+ workspace?: number
54
+ cluster?: string
55
+ namespace?: string
56
+ name?: string
57
+ runtimeRef?: RuntimeRef
58
+ initializer?: Initializer
59
+ trainer?: Trainer
60
+ suspend?: boolean
61
+ description?: string
62
+ }
63
+
64
+ export type GetJobRequest = {
65
+ workspace?: number
66
+ cluster?: string
67
+ namespace?: string
68
+ name?: string
69
+ }
70
+
71
+ export type DeleteJobRequest = {
72
+ workspace?: number
73
+ cluster?: string
74
+ namespace?: string
75
+ name?: string
76
+ }
77
+
78
+ export type ListRuntimesRequest = {
79
+ workspace?: number
80
+ cluster?: string
81
+ namespace?: string
82
+ page?: BaizeCommonCommon.Pagination
83
+ }
84
+
85
+ export type ListClusterRuntimesRequest = {
86
+ workspace?: number
87
+ cluster?: string
88
+ page?: BaizeCommonCommon.Pagination
89
+ }
90
+
91
+ export type ListJobsRequest = {
92
+ workspace?: number
93
+ cluster?: string
94
+ namespace?: string
95
+ page?: BaizeCommonCommon.Pagination
17
96
  }
18
97
 
19
98
  export type ListJobsResponse = {
@@ -21,8 +100,106 @@ export type ListJobsResponse = {
21
100
  page?: BaizeCommonCommon.Pagination
22
101
  }
23
102
 
103
+ export type CreateRuntimeRequest = {
104
+ workspace?: number
105
+ cluster?: string
106
+ namespace?: string
107
+ name?: string
108
+ }
109
+
110
+ export type Runtime = {
111
+ name?: string
112
+ }
113
+
114
+ export type ListRuntimesResponse = {
115
+ items?: Runtime[]
116
+ page?: BaizeCommonCommon.Pagination
117
+ }
118
+
119
+ export type ListClusterRuntimesResponse = {
120
+ items?: Runtime[]
121
+ page?: BaizeCommonCommon.Pagination
122
+ }
123
+
124
+ export type GetRuntimeRequest = {
125
+ workspace?: number
126
+ cluster?: string
127
+ namespace?: string
128
+ name?: string
129
+ }
130
+
131
+ export type GetClusterRuntimeRequest = {
132
+ workspace?: number
133
+ cluster?: string
134
+ name?: string
135
+ }
136
+
137
+ export type DeleteRuntimeRequest = {
138
+ workspace?: number
139
+ cluster?: string
140
+ namespace?: string
141
+ name?: string
142
+ }
143
+
144
+ export type DeleteClusterRuntimeRequest = {
145
+ workspace?: number
146
+ cluster?: string
147
+ name?: string
148
+ }
149
+
150
+ export type CreateClusterRuntimeRequest = {
151
+ workspace?: number
152
+ cluster?: string
153
+ name?: string
154
+ }
155
+
24
156
  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"})
157
+ static CreateJob(req: BaizeManagement_apiJobV1alpha1Job.CreateJobRequest, initReq?: fm.InitReq): Promise<BaizeManagement_apiJobV1alpha1Job.Job> {
158
+ 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)})
159
+ }
160
+ static GetJob(req: BaizeManagement_apiJobV1alpha1Job.SingleJobRequest, initReq?: fm.InitReq): Promise<BaizeManagement_apiJobV1alpha1Job.Job> {
161
+ 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"})
162
+ }
163
+ static DeleteJob(req: BaizeManagement_apiJobV1alpha1Job.SingleJobRequest, initReq?: fm.InitReq): Promise<BaizeManagement_apiJobV1alpha1Job.Job> {
164
+ 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)})
165
+ }
166
+ static ListJobs(req: BaizeManagement_apiJobV1alpha1Job.ListJobsRequest, initReq?: fm.InitReq): Promise<BaizeManagement_apiJobV1alpha1Job.ListJobsResponse> {
167
+ return fm.fetchReq<BaizeManagement_apiJobV1alpha1Job.ListJobsRequest, BaizeManagement_apiJobV1alpha1Job.ListJobsResponse>(`/apis/baize.io/v1alpha2/workspaces/${req["workspace"]}/jobs?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
168
+ }
169
+ static CreateRuntime(req: CreateRuntimeRequest, initReq?: fm.InitReq): Promise<Runtime> {
170
+ 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)})
171
+ }
172
+ static ListRuntimes(req: ListRuntimesRequest, initReq?: fm.InitReq): Promise<ListRuntimesResponse> {
173
+ 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"})
174
+ }
175
+ static GetRuntime(req: GetRuntimeRequest, initReq?: fm.InitReq): Promise<Runtime> {
176
+ 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"})
177
+ }
178
+ static DeleteRuntime(req: DeleteRuntimeRequest, initReq?: fm.InitReq): Promise<Runtime> {
179
+ 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)})
180
+ }
181
+ static CreateClusterRuntime(req: CreateClusterRuntimeRequest, initReq?: fm.InitReq): Promise<Runtime> {
182
+ 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)})
183
+ }
184
+ static ListClusterRuntimes(req: ListClusterRuntimesRequest, initReq?: fm.InitReq): Promise<ListClusterRuntimesResponse> {
185
+ return fm.fetchReq<ListClusterRuntimesRequest, ListClusterRuntimesResponse>(`/apis/baize.io/v1alpha2/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/clusterruntimes?${fm.renderURLSearchParams(req, ["workspace", "cluster"])}`, {...initReq, method: "GET"})
186
+ }
187
+ static GetClusterRuntime(req: GetClusterRuntimeRequest, initReq?: fm.InitReq): Promise<Runtime> {
188
+ 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"})
189
+ }
190
+ static DeleteClusterRuntime(req: DeleteClusterRuntimeRequest, initReq?: fm.InitReq): Promise<Runtime> {
191
+ 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)})
192
+ }
193
+ static DoJobAction(req: BaizeManagement_apiJobV1alpha1Job.JobActionRequest, initReq?: fm.InitReq): Promise<BaizeManagement_apiJobV1alpha1Job.Job> {
194
+ 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)})
195
+ }
196
+ static ListSchedulers(req: BaizeManagement_apiJobV1alpha1Job.CreateJobRequest, initReq?: fm.InitReq): Promise<BaizeManagement_apiJobV1alpha1Job.JobSchedulersResponse> {
197
+ return fm.fetchReq<BaizeManagement_apiJobV1alpha1Job.CreateJobRequest, BaizeManagement_apiJobV1alpha1Job.JobSchedulersResponse>(`/apis/baize.io/v1alpha2/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/jobs/${req["name"]}/schedulers`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
198
+ }
199
+ static ListRdmas(req: BaizeManagement_apiJobV1alpha1Job.ListRdmasRequest, initReq?: fm.InitReq): Promise<BaizeManagement_apiJobV1alpha1Job.ListRdmasResponse> {
200
+ return fm.fetchReq<BaizeManagement_apiJobV1alpha1Job.ListRdmasRequest, BaizeManagement_apiJobV1alpha1Job.ListRdmasResponse>(`/apis/baize.io/v1alpha2/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/rdmas?${fm.renderURLSearchParams(req, ["workspace", "cluster", "namespace"])}`, {...initReq, method: "GET"})
201
+ }
202
+ static ListJobEvents(req: BaizeManagement_apiJobV1alpha1Job.ListJobEventsRequest, initReq?: fm.InitReq): Promise<BaizeManagement_apiEventV1alpha1Event.ListEventsResponse> {
203
+ return fm.fetchReq<BaizeManagement_apiJobV1alpha1Job.ListJobEventsRequest, BaizeManagement_apiEventV1alpha1Event.ListEventsResponse>(`/apis/baize.io/v1alpha2/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/jobs/${req["name"]}/events?${fm.renderURLSearchParams(req, ["workspace", "cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
27
204
  }
28
205
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/baize",
3
- "version": "v0.126.0",
3
+ "version": "v0.127.1",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"