@daocloud-proto/baize 0.110.2 → 0.110.4
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
|
@@ -9,6 +9,7 @@ export enum KubeVolumeVolumeType {
|
|
|
9
9
|
PERSISTENT_VOLUME_CLAIM = "PERSISTENT_VOLUME_CLAIM",
|
|
10
10
|
DATASET = "DATASET",
|
|
11
11
|
DATASET_RUNTIME_ENV = "DATASET_RUNTIME_ENV",
|
|
12
|
+
MODEL = "MODEL",
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
export enum KubeVolumeDataDirection {
|
|
@@ -17,6 +18,11 @@ export enum KubeVolumeDataDirection {
|
|
|
17
18
|
OUTPUT = "OUTPUT",
|
|
18
19
|
}
|
|
19
20
|
|
|
21
|
+
export enum ResourceAffinityType {
|
|
22
|
+
RESOURCE_AFFINITY_TYPE_UNSPECIFIED = "RESOURCE_AFFINITY_TYPE_UNSPECIFIED",
|
|
23
|
+
HAMI_VGPU = "HAMI_VGPU",
|
|
24
|
+
}
|
|
25
|
+
|
|
20
26
|
export type Resources = {
|
|
21
27
|
requests?: {[key: string]: string}
|
|
22
28
|
limits?: {[key: string]: string}
|
|
@@ -35,6 +41,11 @@ export type KubeVolume = {
|
|
|
35
41
|
dataDirection?: KubeVolumeDataDirection
|
|
36
42
|
}
|
|
37
43
|
|
|
44
|
+
export type ResourceAffinity = {
|
|
45
|
+
type?: ResourceAffinityType
|
|
46
|
+
value?: string
|
|
47
|
+
}
|
|
48
|
+
|
|
38
49
|
export type PodConfig = {
|
|
39
50
|
kubeEnvs?: KubeEnv[]
|
|
40
51
|
kubeVolumes?: KubeVolume[]
|
|
@@ -44,6 +55,7 @@ export type PodConfig = {
|
|
|
44
55
|
priorityClass?: string
|
|
45
56
|
queue?: string
|
|
46
57
|
tolerationSeconds?: string
|
|
58
|
+
resourceAffinities?: ResourceAffinity[]
|
|
47
59
|
}
|
|
48
60
|
|
|
49
61
|
export type Affinity = {
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import * as BaizeCommonCommon from "../../../common/common.pb"
|
|
8
|
+
import * as BaizeCommonK8s from "../../../common/k8s.pb"
|
|
8
9
|
import * as fm from "../../../fetch.pb"
|
|
9
10
|
|
|
10
11
|
export enum ClusterStatus {
|
|
@@ -117,6 +118,22 @@ export type ClusterSettingsRequest = {
|
|
|
117
118
|
workspace?: number
|
|
118
119
|
}
|
|
119
120
|
|
|
121
|
+
export type ClusterResourceType = {
|
|
122
|
+
type?: BaizeCommonK8s.ResourceAffinityType
|
|
123
|
+
values?: string[]
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export type ListResourceAffinitiesRequest = {
|
|
127
|
+
workspace?: number
|
|
128
|
+
cluster?: string
|
|
129
|
+
page?: BaizeCommonCommon.Pagination
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export type ListResourceAffinitiesResponse = {
|
|
133
|
+
items?: ClusterResourceType[]
|
|
134
|
+
page?: BaizeCommonCommon.Pagination
|
|
135
|
+
}
|
|
136
|
+
|
|
120
137
|
export class ClusterService {
|
|
121
138
|
static ListClusters(req: ListAIClustersRequest, initReq?: fm.InitReq): Promise<ListAIClustersResponse> {
|
|
122
139
|
return fm.fetchReq<ListAIClustersRequest, ListAIClustersResponse>(`/apis/baize.io/v1alpha1/clusters?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
@@ -133,4 +150,7 @@ export class ClusterService {
|
|
|
133
150
|
static ListStorageClasses(req: ListStorageClassesRequest, initReq?: fm.InitReq): Promise<ListStorageClassesResponse> {
|
|
134
151
|
return fm.fetchReq<ListStorageClassesRequest, ListStorageClassesResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/storage-classes?${fm.renderURLSearchParams(req, ["workspace", "cluster"])}`, {...initReq, method: "GET"})
|
|
135
152
|
}
|
|
153
|
+
static ListResourceAffinities(req: ListResourceAffinitiesRequest, initReq?: fm.InitReq): Promise<ListResourceAffinitiesResponse> {
|
|
154
|
+
return fm.fetchReq<ListResourceAffinitiesRequest, ListResourceAffinitiesResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/resource-affinities?${fm.renderURLSearchParams(req, ["workspace", "cluster"])}`, {...initReq, method: "GET"})
|
|
155
|
+
}
|
|
136
156
|
}
|
|
@@ -101,6 +101,7 @@ export type Dataset = {
|
|
|
101
101
|
share?: boolean
|
|
102
102
|
sharedStoWorkspaces?: BaizeManagement_apiWorkspaceV1alpha1Workspace.Workspace[]
|
|
103
103
|
boundPVC?: DatasetBoundPVC
|
|
104
|
+
lastSync?: GoogleProtobufTimestamp.Timestamp
|
|
104
105
|
}
|
|
105
106
|
|
|
106
107
|
export type DataSourceOptionsConda = {
|
|
@@ -42,6 +42,14 @@ export enum ModelVersionSourceType {
|
|
|
42
42
|
DATASET = "DATASET",
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
export enum ModelVersionStatusPhase {
|
|
46
|
+
PHASE_UNSPECIFIED = "PHASE_UNSPECIFIED",
|
|
47
|
+
PENDING = "PENDING",
|
|
48
|
+
CREATING = "CREATING",
|
|
49
|
+
READY = "READY",
|
|
50
|
+
ERROR = "ERROR",
|
|
51
|
+
}
|
|
52
|
+
|
|
45
53
|
export enum ModelStatusPhase {
|
|
46
54
|
PHASE_UNSPECIFIED = "PHASE_UNSPECIFIED",
|
|
47
55
|
PENDING = "PENDING",
|
|
@@ -69,10 +77,15 @@ export type DatasetRef = {
|
|
|
69
77
|
export type ModelVersionSource = BaseModelVersionSource
|
|
70
78
|
& OneOf<{ datasetRef: DatasetRef }>
|
|
71
79
|
|
|
80
|
+
export type ModelVersionStatus = {
|
|
81
|
+
phase?: ModelVersionStatusPhase
|
|
82
|
+
}
|
|
83
|
+
|
|
72
84
|
export type Version = {
|
|
73
85
|
version?: string
|
|
74
86
|
creationTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
75
87
|
source?: ModelVersionSource
|
|
88
|
+
status?: ModelVersionStatus
|
|
76
89
|
}
|
|
77
90
|
|
|
78
91
|
export type ModelStatus = {
|
|
@@ -134,6 +147,49 @@ export type CreateModelRequest = {
|
|
|
134
147
|
sharedToWorkspaces?: Workspace[]
|
|
135
148
|
}
|
|
136
149
|
|
|
150
|
+
export type UpdateModelRequest = {
|
|
151
|
+
workspace?: number
|
|
152
|
+
name?: string
|
|
153
|
+
cluster?: string
|
|
154
|
+
namespace?: string
|
|
155
|
+
format?: Format
|
|
156
|
+
architecture?: Architecture
|
|
157
|
+
license?: string
|
|
158
|
+
isLLM?: boolean
|
|
159
|
+
latestVersion?: string
|
|
160
|
+
iconUrl?: string
|
|
161
|
+
tags?: string[]
|
|
162
|
+
readme?: string
|
|
163
|
+
share?: boolean
|
|
164
|
+
sharedToWorkspaces?: Workspace[]
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export type CreateModelVersionRequest = {
|
|
168
|
+
name?: string
|
|
169
|
+
cluster?: string
|
|
170
|
+
namespace?: string
|
|
171
|
+
workspace?: number
|
|
172
|
+
version?: string
|
|
173
|
+
source?: ModelVersionSource
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export type UpdateModelVersionRequest = {
|
|
177
|
+
name?: string
|
|
178
|
+
cluster?: string
|
|
179
|
+
namespace?: string
|
|
180
|
+
workspace?: number
|
|
181
|
+
version?: string
|
|
182
|
+
source?: ModelVersionSource
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export type DeleteModelVersionRequest = {
|
|
186
|
+
name?: string
|
|
187
|
+
cluster?: string
|
|
188
|
+
namespace?: string
|
|
189
|
+
workspace?: number
|
|
190
|
+
version?: string
|
|
191
|
+
}
|
|
192
|
+
|
|
137
193
|
export class ModelManagement {
|
|
138
194
|
static ListModels(req: ListModelsRequest, initReq?: fm.InitReq): Promise<ListModelsResponse> {
|
|
139
195
|
return fm.fetchReq<ListModelsRequest, ListModelsResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/models?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
@@ -147,7 +203,19 @@ export class ModelManagement {
|
|
|
147
203
|
static CreateModel(req: CreateModelRequest, initReq?: fm.InitReq): Promise<Model> {
|
|
148
204
|
return fm.fetchReq<CreateModelRequest, Model>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/models`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
149
205
|
}
|
|
206
|
+
static UpdateModel(req: UpdateModelRequest, initReq?: fm.InitReq): Promise<Model> {
|
|
207
|
+
return fm.fetchReq<UpdateModelRequest, Model>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/models/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
208
|
+
}
|
|
150
209
|
static DeleteModel(req: SingleModelRequest, initReq?: fm.InitReq): Promise<Model> {
|
|
151
210
|
return fm.fetchReq<SingleModelRequest, Model>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/models/${req["name"]}`, {...initReq, method: "DELETE", body: JSON.stringify(req, fm.replacer)})
|
|
152
211
|
}
|
|
212
|
+
static CreateModelVersion(req: CreateModelVersionRequest, initReq?: fm.InitReq): Promise<Version> {
|
|
213
|
+
return fm.fetchReq<CreateModelVersionRequest, Version>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/models/${req["name"]}/versions`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
214
|
+
}
|
|
215
|
+
static UpdateModelVersion(req: UpdateModelVersionRequest, initReq?: fm.InitReq): Promise<Version> {
|
|
216
|
+
return fm.fetchReq<UpdateModelVersionRequest, Version>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/models/${req["name"]}/versions/${req["version"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
217
|
+
}
|
|
218
|
+
static DeleteModelVersion(req: DeleteModelVersionRequest, initReq?: fm.InitReq): Promise<Version> {
|
|
219
|
+
return fm.fetchReq<DeleteModelVersionRequest, Version>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/models/${req["name"]}/versions/${req["version"]}`, {...initReq, method: "DELETE", body: JSON.stringify(req, fm.replacer)})
|
|
220
|
+
}
|
|
153
221
|
}
|