@daocloud-proto/baize 0.104.0 → 0.104.2
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 +10 -0
- package/management-api/analysis/v1alpha1/analysis.pb.ts +19 -0
- package/management-api/job/v1alpha1/common.pb.ts +15 -3
- package/management-api/job/v1alpha1/job.pb.ts +5 -2
- package/management-api/notebook/v1alpha1/notebook.pb.ts +4 -0
- package/management-api/queue/v1alpha1/queue.pb.ts +7 -0
- package/management-api/serving/v1alpha1/serving.pb.ts +57 -24
- package/package.json +1 -1
package/common/k8s.pb.ts
CHANGED
|
@@ -27,6 +27,16 @@ export type KubeVolume = {
|
|
|
27
27
|
readOnly?: boolean
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
export type PodConfig = {
|
|
31
|
+
kubeEnvs?: KubeEnv[]
|
|
32
|
+
kubeVolumes?: KubeVolume[]
|
|
33
|
+
resources?: Resources
|
|
34
|
+
affinity?: Affinity
|
|
35
|
+
schedulerName?: string
|
|
36
|
+
priorityClass?: string
|
|
37
|
+
queue?: string
|
|
38
|
+
}
|
|
39
|
+
|
|
30
40
|
export type Affinity = {
|
|
31
41
|
nodeAffinity?: NodeAffinity
|
|
32
42
|
podAffinity?: PodAffinity
|
|
@@ -0,0 +1,19 @@
|
|
|
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 BaizeCommonK8s from "../../../common/k8s.pb"
|
|
8
|
+
|
|
9
|
+
export enum AnalysisConfigType {
|
|
10
|
+
TYPE_UNSPECIFIED = "TYPE_UNSPECIFIED",
|
|
11
|
+
TENSORBOARD = "TENSORBOARD",
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type AnalysisConfig = {
|
|
15
|
+
enabled?: boolean
|
|
16
|
+
type?: AnalysisConfigType
|
|
17
|
+
kubeVolumes?: BaizeCommonK8s.KubeVolume[]
|
|
18
|
+
logPath?: string
|
|
19
|
+
}
|
|
@@ -6,6 +6,15 @@
|
|
|
6
6
|
|
|
7
7
|
import * as BaizeCommonK8s from "../../../common/k8s.pb"
|
|
8
8
|
|
|
9
|
+
type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
|
|
10
|
+
type OneOf<T> =
|
|
11
|
+
| { [k in keyof T]?: undefined }
|
|
12
|
+
| (
|
|
13
|
+
keyof T extends infer K ?
|
|
14
|
+
(K extends string & keyof T ? { [k in K]: T[K] } & Absent<T, K>
|
|
15
|
+
: never)
|
|
16
|
+
: never);
|
|
17
|
+
|
|
9
18
|
export enum QueueType {
|
|
10
19
|
QUEUE_TYPE_UNSPECIFIED = "QUEUE_TYPE_UNSPECIFIED",
|
|
11
20
|
KUEUE = "KUEUE",
|
|
@@ -32,7 +41,8 @@ export type CommonConfig = {
|
|
|
32
41
|
description?: string
|
|
33
42
|
}
|
|
34
43
|
|
|
35
|
-
|
|
44
|
+
|
|
45
|
+
/* baize modified */ export type BaseJobCreationBaseConfig = {
|
|
36
46
|
image?: string
|
|
37
47
|
imagePullSecret?: string
|
|
38
48
|
command?: string[]
|
|
@@ -41,10 +51,12 @@ export type JobCreationBaseConfig = {
|
|
|
41
51
|
annotations?: {[key: string]: string}
|
|
42
52
|
kubeEnvs?: BaizeCommonK8s.KubeEnv[]
|
|
43
53
|
kubeVolumes?: BaizeCommonK8s.KubeVolume[]
|
|
44
|
-
|
|
45
|
-
podAntiAffinity?: BaizeCommonK8s.Affinity
|
|
54
|
+
affinity?: BaizeCommonK8s.Affinity
|
|
46
55
|
}
|
|
47
56
|
|
|
57
|
+
export type JobCreationBaseConfig = BaseJobCreationBaseConfig
|
|
58
|
+
& OneOf<{ tolerationSeconds: string }>
|
|
59
|
+
|
|
48
60
|
export type JobRoleDifferenceConfig = {
|
|
49
61
|
replicas?: number
|
|
50
62
|
resources?: BaizeCommonK8s.Resources
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
import * as BaizeCommonCommon from "../../../common/common.pb"
|
|
8
8
|
import * as BaizeCommonK8s from "../../../common/k8s.pb"
|
|
9
9
|
import * as fm from "../../../fetch.pb"
|
|
10
|
+
import * as BaizeManagement_apiAnalysisV1alpha1Analysis from "../../analysis/v1alpha1/analysis.pb"
|
|
10
11
|
import * as BaizeManagement_apiJobV1alpha1Paddle from "./paddle.pb"
|
|
11
12
|
import * as BaizeManagement_apiJobV1alpha1Pytorch from "./pytorch.pb"
|
|
12
13
|
import * as BaizeManagement_apiJobV1alpha1Tfjob from "./tfjob.pb"
|
|
@@ -39,12 +40,13 @@ export enum JobActionRequestAction {
|
|
|
39
40
|
priorityClass?: string
|
|
40
41
|
runningDuration?: number
|
|
41
42
|
totalResources?: BaizeCommonK8s.Resources
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
affinity?: BaizeCommonK8s.Affinity
|
|
44
|
+
analysis?: BaizeManagement_apiAnalysisV1alpha1Analysis.AnalysisConfig
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
export type Job = BaseJob
|
|
47
48
|
& OneOf<{ pytorch: BaizeManagement_apiJobV1alpha1Pytorch.PyTorchJob; tensorflow: BaizeManagement_apiJobV1alpha1Tfjob.TFJob; paddle: BaizeManagement_apiJobV1alpha1Paddle.PaddleJob }>
|
|
49
|
+
& OneOf<{ tolerationSeconds: string }>
|
|
48
50
|
|
|
49
51
|
export type ListJobsRequest = {
|
|
50
52
|
workspace?: number
|
|
@@ -77,6 +79,7 @@ export type SingleJobRequest = {
|
|
|
77
79
|
description?: string
|
|
78
80
|
queueName?: string
|
|
79
81
|
priorityClass?: string
|
|
82
|
+
analysis?: BaizeManagement_apiAnalysisV1alpha1Analysis.AnalysisConfig
|
|
80
83
|
}
|
|
81
84
|
|
|
82
85
|
export type CreateJobRequest = BaseCreateJobRequest
|
|
@@ -8,6 +8,7 @@ import * as BaizeCommonCommon from "../../../common/common.pb"
|
|
|
8
8
|
import * as BaizeCommonK8s from "../../../common/k8s.pb"
|
|
9
9
|
import * as fm from "../../../fetch.pb"
|
|
10
10
|
import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
|
|
11
|
+
import * as BaizeManagement_apiAnalysisV1alpha1Analysis from "../../analysis/v1alpha1/analysis.pb"
|
|
11
12
|
|
|
12
13
|
export enum NotebookType {
|
|
13
14
|
TYPE_UNSPECIFIED = "TYPE_UNSPECIFIED",
|
|
@@ -75,6 +76,7 @@ export type Notebook = {
|
|
|
75
76
|
creationTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
76
77
|
status?: NotebookStatus
|
|
77
78
|
priorityClass?: string
|
|
79
|
+
analysis?: BaizeManagement_apiAnalysisV1alpha1Analysis.AnalysisConfig
|
|
78
80
|
}
|
|
79
81
|
|
|
80
82
|
export type ListNotebooksResponse = {
|
|
@@ -98,6 +100,7 @@ export type CreateNotebookRequest = {
|
|
|
98
100
|
type?: NotebookType
|
|
99
101
|
config?: NotebookConfig
|
|
100
102
|
priorityClass?: string
|
|
103
|
+
analysis?: BaizeManagement_apiAnalysisV1alpha1Analysis.AnalysisConfig
|
|
101
104
|
}
|
|
102
105
|
|
|
103
106
|
export type UpdateNotebookRequest = {
|
|
@@ -107,6 +110,7 @@ export type UpdateNotebookRequest = {
|
|
|
107
110
|
name?: string
|
|
108
111
|
config?: NotebookConfig
|
|
109
112
|
priorityClass?: string
|
|
113
|
+
analysis?: BaizeManagement_apiAnalysisV1alpha1Analysis.AnalysisConfig
|
|
110
114
|
}
|
|
111
115
|
|
|
112
116
|
export type NotebookActionRequest = {
|
|
@@ -60,6 +60,10 @@ export type ListQueueResponse = {
|
|
|
60
60
|
page?: BaizeCommonCommon.Pagination
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
+
export type QueueJSON = {
|
|
64
|
+
data?: string
|
|
65
|
+
}
|
|
66
|
+
|
|
63
67
|
export type CreateQueueRequest = {
|
|
64
68
|
type?: QueueType
|
|
65
69
|
cluster?: string
|
|
@@ -139,6 +143,9 @@ export class QueueManagement {
|
|
|
139
143
|
static GetQueue(req: GetQueueRequest, initReq?: fm.InitReq): Promise<Queue> {
|
|
140
144
|
return fm.fetchReq<GetQueueRequest, Queue>(`/apis/baize.io/v1alpha1/clusters/${req["cluster"]}/queues/${req["name"]}?${fm.renderURLSearchParams(req, ["cluster", "name"])}`, {...initReq, method: "GET"})
|
|
141
145
|
}
|
|
146
|
+
static GetQueueByJSON(req: GetQueueRequest, initReq?: fm.InitReq): Promise<QueueJSON> {
|
|
147
|
+
return fm.fetchReq<GetQueueRequest, QueueJSON>(`/apis/baize.io/v1alpha1/clusters/${req["cluster"]}/queues/${req["name"]}/json?${fm.renderURLSearchParams(req, ["cluster", "name"])}`, {...initReq, method: "GET"})
|
|
148
|
+
}
|
|
142
149
|
static DeleteQueue(req: DeleteQueueRequest, initReq?: fm.InitReq): Promise<Queue> {
|
|
143
150
|
return fm.fetchReq<DeleteQueueRequest, Queue>(`/apis/baize.io/v1alpha1/clusters/${req["cluster"]}/queues/${req["name"]}`, {...initReq, method: "DELETE", body: JSON.stringify(req, fm.replacer)})
|
|
144
151
|
}
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
import * as BaizeCommonCommon from "../../../common/common.pb"
|
|
8
8
|
import * as BaizeCommonK8s from "../../../common/k8s.pb"
|
|
9
9
|
import * as fm from "../../../fetch.pb"
|
|
10
|
+
import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
|
|
10
11
|
import * as BaizeManagement_apiServingTritonModel_config from "../triton/model_config.pb"
|
|
11
12
|
|
|
12
13
|
type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
|
|
@@ -18,6 +19,13 @@ type OneOf<T> =
|
|
|
18
19
|
: never)
|
|
19
20
|
: never);
|
|
20
21
|
|
|
22
|
+
export enum ServiceType {
|
|
23
|
+
SERVICE_TYPE_UNSPECIFIED = "SERVICE_TYPE_UNSPECIFIED",
|
|
24
|
+
NODE_PORT = "NODE_PORT",
|
|
25
|
+
LOAD_BALANCER = "LOAD_BALANCER",
|
|
26
|
+
CLUSTER_IP = "CLUSTER_IP",
|
|
27
|
+
}
|
|
28
|
+
|
|
21
29
|
export enum FrameworkType {
|
|
22
30
|
FRAMEWORK_TYPE_UNSPECIFIED = "FRAMEWORK_TYPE_UNSPECIFIED",
|
|
23
31
|
FRAMEWORK_TYPE_TRITON = "FRAMEWORK_TYPE_TRITON",
|
|
@@ -31,30 +39,22 @@ export enum FrameworkTritonBackend {
|
|
|
31
39
|
TRITON_BACKEND_ONNX = "TRITON_BACKEND_ONNX",
|
|
32
40
|
}
|
|
33
41
|
|
|
34
|
-
export enum InferenceServingServiceType {
|
|
35
|
-
SERVICE_TYPE_UNSPECIFIED = "SERVICE_TYPE_UNSPECIFIED",
|
|
36
|
-
NODE_PORT = "NODE_PORT",
|
|
37
|
-
LOAD_BALANCER = "LOAD_BALANCER",
|
|
38
|
-
CLUSTER_IP = "CLUSTER_IP",
|
|
39
|
-
}
|
|
40
|
-
|
|
41
42
|
export enum InferenceServingStatusPhase {
|
|
42
43
|
PHASE_UNSPECIFIED = "PHASE_UNSPECIFIED",
|
|
43
44
|
PENDING = "PENDING",
|
|
44
45
|
UPDATING_OR_CREATING = "UPDATING_OR_CREATING",
|
|
45
46
|
RUNNING = "RUNNING",
|
|
46
47
|
FAILED = "FAILED",
|
|
48
|
+
DELETING = "DELETING",
|
|
49
|
+
STOPPED = "STOPPED",
|
|
47
50
|
}
|
|
48
51
|
|
|
49
|
-
export enum
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
LOAD_BALANCER = "LOAD_BALANCER",
|
|
53
|
-
CLUSTER_IP = "CLUSTER_IP",
|
|
52
|
+
export enum ServingAuthAuthType {
|
|
53
|
+
AUTH_TYPE_UNSPECIFIED = "AUTH_TYPE_UNSPECIFIED",
|
|
54
|
+
TRITON_RESTRICTED_KEY = "TRITON_RESTRICTED_KEY",
|
|
54
55
|
}
|
|
55
56
|
|
|
56
57
|
export type FrameworkTriton = {
|
|
57
|
-
secretRef?: string
|
|
58
58
|
backend?: FrameworkTritonBackend
|
|
59
59
|
}
|
|
60
60
|
|
|
@@ -94,13 +94,16 @@ export type ServingConfigTritonServingConfig = BaseServingConfigTritonServingCon
|
|
|
94
94
|
|
|
95
95
|
|
|
96
96
|
/* baize modified */ export type BaseServingConfig = {
|
|
97
|
+
name?: string
|
|
98
|
+
version?: string
|
|
99
|
+
modelPath?: string
|
|
97
100
|
}
|
|
98
101
|
|
|
99
102
|
export type ServingConfig = BaseServingConfig
|
|
100
103
|
& OneOf<{ triton: ServingConfigTritonServingConfig }>
|
|
101
104
|
|
|
102
|
-
export type
|
|
103
|
-
serviceType?:
|
|
105
|
+
export type ServiceConfig = {
|
|
106
|
+
serviceType?: ServiceType
|
|
104
107
|
}
|
|
105
108
|
|
|
106
109
|
export type InferenceServing = {
|
|
@@ -108,11 +111,14 @@ export type InferenceServing = {
|
|
|
108
111
|
cluster?: string
|
|
109
112
|
namespace?: string
|
|
110
113
|
models?: ServingConfig[]
|
|
111
|
-
|
|
112
|
-
kubeVolumes?: BaizeCommonK8s.KubeVolume[]
|
|
113
|
-
serviceConfig?: InferenceServingServiceConfig
|
|
114
|
+
serviceConfig?: ServiceConfig
|
|
114
115
|
replicas?: number
|
|
116
|
+
labels?: {[key: string]: string}
|
|
117
|
+
annotations?: {[key: string]: string}
|
|
118
|
+
framework?: Framework
|
|
119
|
+
podConfig?: BaizeCommonK8s.PodConfig
|
|
115
120
|
status?: InferenceServingStatus
|
|
121
|
+
lastUpdated?: GoogleProtobufTimestamp.Timestamp
|
|
116
122
|
}
|
|
117
123
|
|
|
118
124
|
export type InferenceServingStatusModelStatus = {
|
|
@@ -127,20 +133,45 @@ export type InferenceServingStatus = {
|
|
|
127
133
|
accessBaseUrl?: string
|
|
128
134
|
}
|
|
129
135
|
|
|
130
|
-
export type
|
|
131
|
-
|
|
136
|
+
export type ServingAuthTritonRestrictedKeyValue = {
|
|
137
|
+
key?: string
|
|
138
|
+
value?: string
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
/* baize modified */ export type BaseServingAuth = {
|
|
143
|
+
authType?: ServingAuthAuthType
|
|
132
144
|
}
|
|
133
145
|
|
|
146
|
+
export type ServingAuth = BaseServingAuth
|
|
147
|
+
& OneOf<{ tritonRestrictedKeyValue: ServingAuthTritonRestrictedKeyValue }>
|
|
148
|
+
|
|
134
149
|
export type CreateInferenceServingRequest = {
|
|
135
150
|
workspace?: number
|
|
136
151
|
name?: string
|
|
137
152
|
cluster?: string
|
|
138
153
|
namespace?: string
|
|
139
154
|
models?: ServingConfig[]
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
155
|
+
serviceConfig?: ServiceConfig
|
|
156
|
+
replicas?: number
|
|
157
|
+
labels?: {[key: string]: string}
|
|
158
|
+
annotations?: {[key: string]: string}
|
|
159
|
+
podConfig?: BaizeCommonK8s.PodConfig
|
|
160
|
+
framework?: Framework
|
|
161
|
+
auth?: ServingAuth
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export type UpdateInferenceServingRequest = {
|
|
165
|
+
workspace?: number
|
|
166
|
+
name?: string
|
|
167
|
+
cluster?: string
|
|
168
|
+
namespace?: string
|
|
169
|
+
models?: ServingConfig[]
|
|
143
170
|
replicas?: number
|
|
171
|
+
labels?: {[key: string]: string}
|
|
172
|
+
annotations?: {[key: string]: string}
|
|
173
|
+
podConfig?: BaizeCommonK8s.PodConfig
|
|
174
|
+
auth?: ServingAuth
|
|
144
175
|
}
|
|
145
176
|
|
|
146
177
|
export type SingleInferenceServingRequest = {
|
|
@@ -151,7 +182,6 @@ export type SingleInferenceServingRequest = {
|
|
|
151
182
|
}
|
|
152
183
|
|
|
153
184
|
export type ListInferenceServingsRequest = {
|
|
154
|
-
name?: string
|
|
155
185
|
cluster?: string
|
|
156
186
|
namespace?: string
|
|
157
187
|
workspace?: number
|
|
@@ -173,6 +203,9 @@ export class InferenceServingManagement {
|
|
|
173
203
|
static ListInferenceServings(req: ListInferenceServingsRequest, initReq?: fm.InitReq): Promise<ListInferenceServingsResponse> {
|
|
174
204
|
return fm.fetchReq<ListInferenceServingsRequest, ListInferenceServingsResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/inference-serving?${fm.renderURLSearchParams(req, ["workspace", "cluster", "namespace"])}`, {...initReq, method: "GET"})
|
|
175
205
|
}
|
|
206
|
+
static UpdateInferenceServing(req: UpdateInferenceServingRequest, initReq?: fm.InitReq): Promise<InferenceServing> {
|
|
207
|
+
return fm.fetchReq<UpdateInferenceServingRequest, InferenceServing>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/inference-serving/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
208
|
+
}
|
|
176
209
|
static DeleteInferenceServing(req: SingleInferenceServingRequest, initReq?: fm.InitReq): Promise<InferenceServing> {
|
|
177
210
|
return fm.fetchReq<SingleInferenceServingRequest, InferenceServing>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/inference-serving/${req["name"]}`, {...initReq, method: "DELETE", body: JSON.stringify(req, fm.replacer)})
|
|
178
211
|
}
|