@daocloud-proto/baize 0.103.0 → 0.103.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.
- package/management-api/dataset/v1alpha1/dataset.pb.ts +27 -0
- package/management-api/job/v1alpha1/common.pb.ts +1 -0
- package/management-api/job/v1alpha1/job.pb.ts +0 -20
- package/management-api/notebook/v1alpha1/notebook.pb.ts +3 -0
- package/management-api/pod/v1alpha1/pod.pb.ts +55 -0
- package/management-api/queue/v1alpha1/queue.pb.ts +6 -0
- package/package.json +1 -1
|
@@ -49,6 +49,11 @@ export enum DatasetBoundPVCAccessMode {
|
|
|
49
49
|
READ_WRITE_MANY = "READ_WRITE_MANY",
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
+
export enum DatasetActionRequestAction {
|
|
53
|
+
ACTION_UNSPECIFIED = "ACTION_UNSPECIFIED",
|
|
54
|
+
RERUN = "RERUN",
|
|
55
|
+
}
|
|
56
|
+
|
|
52
57
|
export type DataSource = {
|
|
53
58
|
type?: DataSourceType
|
|
54
59
|
uri?: string
|
|
@@ -163,6 +168,22 @@ export type SingleDatasetRequest = {
|
|
|
163
168
|
name?: string
|
|
164
169
|
}
|
|
165
170
|
|
|
171
|
+
export type UpdateDatasetRequest = {
|
|
172
|
+
workspace?: number
|
|
173
|
+
cluster?: string
|
|
174
|
+
namespace?: string
|
|
175
|
+
name?: string
|
|
176
|
+
secretOptions?: SecretOptions
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export type DatasetActionRequest = {
|
|
180
|
+
workspace?: number
|
|
181
|
+
cluster?: string
|
|
182
|
+
namespace?: string
|
|
183
|
+
name?: string
|
|
184
|
+
action?: DatasetActionRequestAction
|
|
185
|
+
}
|
|
186
|
+
|
|
166
187
|
export class DatasetManagement {
|
|
167
188
|
static ListDatasets(req: ListDatasetRequest, initReq?: fm.InitReq): Promise<ListDatasetResponse> {
|
|
168
189
|
return fm.fetchReq<ListDatasetRequest, ListDatasetResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/datasets?${fm.renderURLSearchParams(req, ["workspace", "cluster", "namespace"])}`, {...initReq, method: "GET"})
|
|
@@ -176,4 +197,10 @@ export class DatasetManagement {
|
|
|
176
197
|
static DeleteDataset(req: SingleDatasetRequest, initReq?: fm.InitReq): Promise<Dataset> {
|
|
177
198
|
return fm.fetchReq<SingleDatasetRequest, Dataset>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/datasets/${req["name"]}`, {...initReq, method: "DELETE"})
|
|
178
199
|
}
|
|
200
|
+
static UpdateDataset(req: UpdateDatasetRequest, initReq?: fm.InitReq): Promise<Dataset> {
|
|
201
|
+
return fm.fetchReq<UpdateDatasetRequest, Dataset>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/datasets/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
202
|
+
}
|
|
203
|
+
static DatasetDoAction(req: DatasetActionRequest, initReq?: fm.InitReq): Promise<Dataset> {
|
|
204
|
+
return fm.fetchReq<DatasetActionRequest, Dataset>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/datasets/${req["name"]}/actions`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
205
|
+
}
|
|
179
206
|
}
|
|
@@ -89,23 +89,6 @@ export type JobActionRequest = {
|
|
|
89
89
|
action?: JobActionRequestAction
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
export type JobInstanceContainer = {
|
|
93
|
-
name?: string
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
export type JobInstance = {
|
|
97
|
-
cluster?: string
|
|
98
|
-
namespace?: string
|
|
99
|
-
name?: string
|
|
100
|
-
phase?: string
|
|
101
|
-
containers?: JobInstanceContainer[]
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
export type JobInstanceListResponse = {
|
|
105
|
-
items?: JobInstance[]
|
|
106
|
-
page?: BaizeCommonCommon.Pagination
|
|
107
|
-
}
|
|
108
|
-
|
|
109
92
|
export class JobsManagement {
|
|
110
93
|
static ListJobs(req: ListJobsRequest, initReq?: fm.InitReq): Promise<ListJobsResponse> {
|
|
111
94
|
return fm.fetchReq<ListJobsRequest, ListJobsResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/jobs?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
@@ -113,9 +96,6 @@ export class JobsManagement {
|
|
|
113
96
|
static GetJob(req: SingleJobRequest, initReq?: fm.InitReq): Promise<Job> {
|
|
114
97
|
return fm.fetchReq<SingleJobRequest, Job>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/jobs/${req["name"]}?${fm.renderURLSearchParams(req, ["workspace", "cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
115
98
|
}
|
|
116
|
-
static GetJobInstanceList(req: SingleJobRequest, initReq?: fm.InitReq): Promise<JobInstanceListResponse> {
|
|
117
|
-
return fm.fetchReq<SingleJobRequest, JobInstanceListResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/jobs/${req["name"]}/instances?${fm.renderURLSearchParams(req, ["workspace", "cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
118
|
-
}
|
|
119
99
|
static CreateJob(req: CreateJobRequest, initReq?: fm.InitReq): Promise<Job> {
|
|
120
100
|
return fm.fetchReq<CreateJobRequest, Job>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/jobs`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
121
101
|
}
|
|
@@ -74,6 +74,7 @@ export type Notebook = {
|
|
|
74
74
|
config?: NotebookConfig
|
|
75
75
|
creationTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
76
76
|
status?: NotebookStatus
|
|
77
|
+
priorityClass?: string
|
|
77
78
|
}
|
|
78
79
|
|
|
79
80
|
export type ListNotebooksResponse = {
|
|
@@ -96,6 +97,7 @@ export type CreateNotebookRequest = {
|
|
|
96
97
|
queueName?: string
|
|
97
98
|
type?: NotebookType
|
|
98
99
|
config?: NotebookConfig
|
|
100
|
+
priorityClass?: string
|
|
99
101
|
}
|
|
100
102
|
|
|
101
103
|
export type UpdateNotebookRequest = {
|
|
@@ -104,6 +106,7 @@ export type UpdateNotebookRequest = {
|
|
|
104
106
|
namespace?: string
|
|
105
107
|
name?: string
|
|
106
108
|
config?: NotebookConfig
|
|
109
|
+
priorityClass?: string
|
|
107
110
|
}
|
|
108
111
|
|
|
109
112
|
export type NotebookActionRequest = {
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
/*
|
|
4
|
+
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import * as BaizeCommonCommon from "../../../common/common.pb"
|
|
8
|
+
import * as BaizeCommonK8s from "../../../common/k8s.pb"
|
|
9
|
+
import * as fm from "../../../fetch.pb"
|
|
10
|
+
import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
|
|
11
|
+
|
|
12
|
+
export enum ResourceType {
|
|
13
|
+
JOB_TYPE_UNSPECIFIED = "JOB_TYPE_UNSPECIFIED",
|
|
14
|
+
PYTORCH = "PYTORCH",
|
|
15
|
+
TENSORFLOW = "TENSORFLOW",
|
|
16
|
+
PADDLE = "PADDLE",
|
|
17
|
+
NOTEBOOK = "NOTEBOOK",
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type PodRequest = {
|
|
21
|
+
workspace?: number
|
|
22
|
+
type?: ResourceType
|
|
23
|
+
cluster?: string
|
|
24
|
+
namespace?: string
|
|
25
|
+
name?: string
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type PodInstanceContainer = {
|
|
29
|
+
name?: string
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export type PodInstance = {
|
|
33
|
+
cluster?: string
|
|
34
|
+
namespace?: string
|
|
35
|
+
name?: string
|
|
36
|
+
phase?: string
|
|
37
|
+
containerReadyCount?: number
|
|
38
|
+
containerTotalCount?: number
|
|
39
|
+
podIp?: string
|
|
40
|
+
nodeName?: string
|
|
41
|
+
resources?: BaizeCommonK8s.Resources
|
|
42
|
+
containers?: PodInstanceContainer[]
|
|
43
|
+
creationTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export type PodInstanceListResponse = {
|
|
47
|
+
items?: PodInstance[]
|
|
48
|
+
page?: BaizeCommonCommon.Pagination
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export class podsManagement {
|
|
52
|
+
static GetPodInstanceList(req: PodRequest, initReq?: fm.InitReq): Promise<PodInstanceListResponse> {
|
|
53
|
+
return fm.fetchReq<PodRequest, PodInstanceListResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/resources/${req["name"]}/instances?${fm.renderURLSearchParams(req, ["workspace", "cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -41,6 +41,8 @@ export type Queue = {
|
|
|
41
41
|
description?: string
|
|
42
42
|
resources?: QueueResource[]
|
|
43
43
|
resourcesAvailable?: QueueResource[]
|
|
44
|
+
labels?: {[key: string]: string}
|
|
45
|
+
annotations?: {[key: string]: string}
|
|
44
46
|
status?: QueueStatus
|
|
45
47
|
strategy?: QueueStrategy
|
|
46
48
|
workspaceAlias?: string
|
|
@@ -66,6 +68,8 @@ export type CreateQueueRequest = {
|
|
|
66
68
|
description?: string
|
|
67
69
|
resources?: QueueResource[]
|
|
68
70
|
strategy?: QueueStrategy
|
|
71
|
+
labels?: {[key: string]: string}
|
|
72
|
+
annotations?: {[key: string]: string}
|
|
69
73
|
}
|
|
70
74
|
|
|
71
75
|
export type UpdateQueueRequest = {
|
|
@@ -76,6 +80,8 @@ export type UpdateQueueRequest = {
|
|
|
76
80
|
description?: string
|
|
77
81
|
resources?: QueueResource[]
|
|
78
82
|
strategy?: QueueStrategy
|
|
83
|
+
labels?: {[key: string]: string}
|
|
84
|
+
annotations?: {[key: string]: string}
|
|
79
85
|
}
|
|
80
86
|
|
|
81
87
|
export type GetQueueRequest = {
|