@daocloud-proto/baize 0.108.3 → 0.110.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.
|
@@ -41,6 +41,12 @@ export enum DataSourceOptionsCondaPackageManager {
|
|
|
41
41
|
CONDA = "CONDA",
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
+
export enum DataSourceOptionsS3Provider {
|
|
45
|
+
PROVIDER_UNSPECIFIED = "PROVIDER_UNSPECIFIED",
|
|
46
|
+
AWS = "AWS",
|
|
47
|
+
MINIO = "MINIO",
|
|
48
|
+
}
|
|
49
|
+
|
|
44
50
|
export enum SecretOptionsAuthType {
|
|
45
51
|
AUTH_TYPE_UNSPECIFIED = "AUTH_TYPE_UNSPECIFIED",
|
|
46
52
|
BASIC = "BASIC",
|
|
@@ -105,6 +111,7 @@ export type DataSourceOptionsGit = {
|
|
|
105
111
|
export type DataSourceOptionsS3 = {
|
|
106
112
|
region?: string
|
|
107
113
|
endpoint?: string
|
|
114
|
+
provider?: DataSourceOptionsS3Provider
|
|
108
115
|
}
|
|
109
116
|
|
|
110
117
|
export type DataSourceOptionsHttp = {
|
|
@@ -0,0 +1,153 @@
|
|
|
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 fm from "../../../fetch.pb"
|
|
9
|
+
import * as GoogleProtobufTimestamp from "../../../google/protobuf/timestamp.pb"
|
|
10
|
+
|
|
11
|
+
type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
|
|
12
|
+
type OneOf<T> =
|
|
13
|
+
| { [k in keyof T]?: undefined }
|
|
14
|
+
| (
|
|
15
|
+
keyof T extends infer K ?
|
|
16
|
+
(K extends string & keyof T ? { [k in K]: T[K] } & Absent<T, K>
|
|
17
|
+
: never)
|
|
18
|
+
: never);
|
|
19
|
+
|
|
20
|
+
export enum Format {
|
|
21
|
+
FORMAT_UNSPECIFIED = "FORMAT_UNSPECIFIED",
|
|
22
|
+
PYTORCH = "PYTORCH",
|
|
23
|
+
TENSORFLOW = "TENSORFLOW",
|
|
24
|
+
ONNX = "ONNX",
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export enum Architecture {
|
|
28
|
+
ARCHITECTURE_UNSPECIFIED = "ARCHITECTURE_UNSPECIFIED",
|
|
29
|
+
CNN = "CNN",
|
|
30
|
+
RNN = "RNN",
|
|
31
|
+
LSTM = "LSTM",
|
|
32
|
+
TRANSFORMER = "TRANSFORMER",
|
|
33
|
+
MLP = "MLP",
|
|
34
|
+
BERT = "BERT",
|
|
35
|
+
GAN = "GAN",
|
|
36
|
+
RESNET = "RESNET",
|
|
37
|
+
OTHER = "OTHER",
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export enum ModelVersionSourceType {
|
|
41
|
+
VERSION_SOURCE_TYPE_UNSPECIFIED = "VERSION_SOURCE_TYPE_UNSPECIFIED",
|
|
42
|
+
DATASET = "DATASET",
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export enum ModelStatusPhase {
|
|
46
|
+
PHASE_UNSPECIFIED = "PHASE_UNSPECIFIED",
|
|
47
|
+
PENDING = "PENDING",
|
|
48
|
+
CREATING = "CREATING",
|
|
49
|
+
READY = "READY",
|
|
50
|
+
ERROR = "ERROR",
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export type Workspace = {
|
|
54
|
+
workspaceId?: number
|
|
55
|
+
alias?: string
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export type DatasetRef = {
|
|
59
|
+
namespace?: string
|
|
60
|
+
name?: string
|
|
61
|
+
path?: string
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
/* baize modified */ export type BaseModelVersionSource = {
|
|
66
|
+
type?: ModelVersionSourceType
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export type ModelVersionSource = BaseModelVersionSource
|
|
70
|
+
& OneOf<{ datasetRef: DatasetRef }>
|
|
71
|
+
|
|
72
|
+
export type Version = {
|
|
73
|
+
version?: string
|
|
74
|
+
creationTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
75
|
+
source?: ModelVersionSource
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export type ModelStatus = {
|
|
79
|
+
phase?: ModelStatusPhase
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export type Model = {
|
|
83
|
+
name?: string
|
|
84
|
+
cluster?: string
|
|
85
|
+
namespace?: string
|
|
86
|
+
share?: boolean
|
|
87
|
+
sharedToWorkspaces?: Workspace[]
|
|
88
|
+
format?: Format
|
|
89
|
+
architecture?: Architecture
|
|
90
|
+
versions?: Version[]
|
|
91
|
+
license?: string
|
|
92
|
+
isLLM?: boolean
|
|
93
|
+
latestVersion?: string
|
|
94
|
+
iconUrl?: string
|
|
95
|
+
tags?: string[]
|
|
96
|
+
readme?: string
|
|
97
|
+
status?: ModelStatus
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export type ListModelsRequest = {
|
|
101
|
+
workspace?: number
|
|
102
|
+
cluster?: string
|
|
103
|
+
namespace?: string
|
|
104
|
+
page?: BaizeCommonCommon.Pagination
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export type ListModelsResponse = {
|
|
108
|
+
items?: Model[]
|
|
109
|
+
page?: BaizeCommonCommon.Pagination
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export type SingleModelRequest = {
|
|
113
|
+
name?: string
|
|
114
|
+
cluster?: string
|
|
115
|
+
namespace?: string
|
|
116
|
+
workspace?: number
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export type CreateModelRequest = {
|
|
120
|
+
workspace?: number
|
|
121
|
+
name?: string
|
|
122
|
+
cluster?: string
|
|
123
|
+
namespace?: string
|
|
124
|
+
format?: Format
|
|
125
|
+
architecture?: Architecture
|
|
126
|
+
versions?: Version[]
|
|
127
|
+
license?: string
|
|
128
|
+
isLLM?: boolean
|
|
129
|
+
latestVersion?: string
|
|
130
|
+
iconUrl?: string
|
|
131
|
+
tags?: string[]
|
|
132
|
+
readme?: string
|
|
133
|
+
share?: boolean
|
|
134
|
+
sharedToWorkspaces?: Workspace[]
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export class ModelManagement {
|
|
138
|
+
static ListModels(req: ListModelsRequest, initReq?: fm.InitReq): Promise<ListModelsResponse> {
|
|
139
|
+
return fm.fetchReq<ListModelsRequest, ListModelsResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/models?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
140
|
+
}
|
|
141
|
+
static ListSharedModels(req: ListModelsRequest, initReq?: fm.InitReq): Promise<ListModelsResponse> {
|
|
142
|
+
return fm.fetchReq<ListModelsRequest, ListModelsResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/shared-models?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
|
|
143
|
+
}
|
|
144
|
+
static GetModel(req: SingleModelRequest, initReq?: fm.InitReq): Promise<Model> {
|
|
145
|
+
return fm.fetchReq<SingleModelRequest, Model>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/models/${req["name"]}?${fm.renderURLSearchParams(req, ["workspace", "cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
146
|
+
}
|
|
147
|
+
static CreateModel(req: CreateModelRequest, initReq?: fm.InitReq): Promise<Model> {
|
|
148
|
+
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
|
+
}
|
|
150
|
+
static DeleteModel(req: SingleModelRequest, initReq?: fm.InitReq): Promise<Model> {
|
|
151
|
+
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
|
+
}
|
|
153
|
+
}
|
|
@@ -46,6 +46,13 @@ export enum NotebookActionRequestAction {
|
|
|
46
46
|
STOP = "STOP",
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
+
export enum SnapshotTaskStatus {
|
|
50
|
+
Status_UNSPECIFIED = "Status_UNSPECIFIED",
|
|
51
|
+
CREATED = "CREATED",
|
|
52
|
+
FAILED = "FAILED",
|
|
53
|
+
COMPLETED = "COMPLETED",
|
|
54
|
+
}
|
|
55
|
+
|
|
49
56
|
export type ListNotebooksRequest = {
|
|
50
57
|
workspace?: number
|
|
51
58
|
cluster?: string
|
|
@@ -157,6 +164,7 @@ export type CreateNotebookSnapshotTaskRequest = {
|
|
|
157
164
|
cluster?: string
|
|
158
165
|
namespace?: string
|
|
159
166
|
name?: string
|
|
167
|
+
imageConfig?: BaizeManagement_apiImageV1alpha1Image.ImageConfig
|
|
160
168
|
}
|
|
161
169
|
|
|
162
170
|
export type SnapshotTask = {
|
|
@@ -165,6 +173,31 @@ export type SnapshotTask = {
|
|
|
165
173
|
namespace?: string
|
|
166
174
|
name?: string
|
|
167
175
|
triggerRound?: number
|
|
176
|
+
imageConfig?: BaizeManagement_apiImageV1alpha1Image.ImageConfig
|
|
177
|
+
creationTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
178
|
+
status?: SnapshotTaskStatus
|
|
179
|
+
notebookName?: string
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export type ListSnapshotTasksRequest = {
|
|
183
|
+
workspace?: number
|
|
184
|
+
cluster?: string
|
|
185
|
+
namespace?: string
|
|
186
|
+
name?: string
|
|
187
|
+
page?: BaizeCommonCommon.Pagination
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export type ListSnapshotTasksResponse = {
|
|
191
|
+
items?: SnapshotTask[]
|
|
192
|
+
page?: BaizeCommonCommon.Pagination
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export type ResetNotebookImageRequest = {
|
|
196
|
+
workspace?: number
|
|
197
|
+
cluster?: string
|
|
198
|
+
namespace?: string
|
|
199
|
+
name?: string
|
|
200
|
+
snapshotTaskName?: string
|
|
168
201
|
}
|
|
169
202
|
|
|
170
203
|
export type NotebookImage = {
|
|
@@ -205,4 +238,10 @@ export class NotebookService {
|
|
|
205
238
|
static GetNotebookImageList(req: NotebookImageListRequest, initReq?: fm.InitReq): Promise<NotebookImageListResponse> {
|
|
206
239
|
return fm.fetchReq<NotebookImageListRequest, NotebookImageListResponse>(`/apis/baize.io/v1alpha1/notebook-images?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
207
240
|
}
|
|
241
|
+
static ListNotebookSnapshotTasks(req: ListSnapshotTasksRequest, initReq?: fm.InitReq): Promise<ListSnapshotTasksResponse> {
|
|
242
|
+
return fm.fetchReq<ListSnapshotTasksRequest, ListSnapshotTasksResponse>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/notebooks/${req["name"]}/snapshottasks?${fm.renderURLSearchParams(req, ["workspace", "cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
|
|
243
|
+
}
|
|
244
|
+
static ResetNotebookImage(req: ResetNotebookImageRequest, initReq?: fm.InitReq): Promise<SnapshotTask> {
|
|
245
|
+
return fm.fetchReq<ResetNotebookImageRequest, SnapshotTask>(`/apis/baize.io/v1alpha1/workspaces/${req["workspace"]}/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/notebooks/${req["name"]}/image`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
246
|
+
}
|
|
208
247
|
}
|
|
@@ -134,6 +134,7 @@ export type InferenceServing = {
|
|
|
134
134
|
status?: InferenceServingStatus
|
|
135
135
|
lastUpdated?: GoogleProtobufTimestamp.Timestamp
|
|
136
136
|
authType?: ServingAuthAuthType
|
|
137
|
+
creationTimestamp?: GoogleProtobufTimestamp.Timestamp
|
|
137
138
|
}
|
|
138
139
|
|
|
139
140
|
export type InferenceServingStatusModelStatus = {
|